(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



(* :Name: EPM`Graphics` *)


(* :Book: Essentials of Programming in Mathematica *)


(* :Author: Paul Wellin *)


(* :Summary: This package contains the functions defined in Chapter 8 Graphics. *)


(* :Context: EPM`Graphics` *)


(* :Package Version: 1.0 *)


(* :Copyright: Copyright 2015, Paul R Wellin *)


(* :History: Version 1.0 by Paul Wellin, Dec 2012 *)


(* :Keywords: amino acids, centroids, space-filling plots, color wheel, plotting complex numbers, convex hull, dot plots, eigenvectors, epicycloids, hypocycloids, integer lattice, plotting paths, plotting roots, standard deviation, triangle area, Venn diagrams, point in polygon
*)


(* :Source: Graphics.nb *)


(* :Mathematica Version: 10.3 *)


(* Tested in Mathematica 11.1 *)


Remove[AminoAcidPlot,CentroidPlot,ChemicalSpaceFillingPlot,colorWheel,ComplexListPlot,ComplexRootPlot,ConvexHullPlot,Dimension,DotPlot,EigenvectorPlot,EpicycloidPlot,Hypocycloid,HypocycloidPlot,Lattice3D,PathPlot,RandomCompose,RandomWalkPi,RootPlot,SimplePath,StandardDeviationPlot,TriangleArea,VennDiagram]


(* BeginPackage["EPM`Graphics`"] *)


AminoAcidPlot::usage="AminoAcidPlot[\!\(\*
StyleBox[\"aa\", \"TI\"]\)] plots the amino acid \!\(\*
StyleBox[\"aa\", \"TI\"]\) as a colored structure diagram. A second argument can be given to specify a different visualization, including \"StructureDiagram\", \"CHColorStructureDiagram\", \"CHStructureDiagram\", \"ColorStructureDiagram\", \"MoleculePlot\", \"SpaceFillingMoleculePlot\".";


CentroidPlot::usage="CentroidPlot[Triangle[{\!\(\*SubscriptBox[
StyleBox[\"pt\", \"TI\"], \(1\)]\)\!\(\*SubscriptBox[
StyleBox[\"pt\", \"TI\"], \(2\)]\)\!\(\*
StyleBox[\",\", \"TI\"]\)\!\(\*SubscriptBox[
StyleBox[\"pt\", \"TI\"], \(3\)]\)}]] generates a plot of a triangle together with its centroids and the triangle medians.";


ChemicalSpaceFillingPlot::usage="ChemicalSpaceFillingPlot[\!\(\*
StyleBox[\"chem\", \"TI\"]\)] generates a molecular space-filling plot for the chemical \!\(\*
StyleBox[\"chem\", \"TI\"]\).";


colorWheel::usage="colorWheel[\!\(\*
StyleBox[\"n\", \"TI\"]\)] displays a color wheel with \!\(\*
StyleBox[\"n\", \"TI\"]\) sectors.";


ComplexListPlot::usage="ComplexListPlot[\!\(\*
StyleBox[\"pts\", \"TI\"]\)] plots the complex points \!\(\*
StyleBox[\"pts\", \"TI\"]\) in the complex plane. ComplexListPlot inherits all the options of ListPlot.";


ComplexRootPlot::usage="ComplexRootPlot[\!\(\*
StyleBox[\"poly\", \"TI\"]\), \!\(\*
StyleBox[\"var\", \"TI\"]\)] plots the complex root of the polynomial \!\(\*
StyleBox[\"poly\", \"TI\"]\) in the complex plane.";


ConvexHullPlot::usage="ConvexHullPlot[\!\(\*
StyleBox[\"pts\", \"TI\"]\)] plots the convex hull of the set of points \!\(\*
StyleBox[\"pts\", \"TI\"]\). ConvexHullPlot inherits options from Graphics.";


Dimension::usage="Dimension is an option to ConvexHullPlot. Values can be either 2 or 3.";


DotPlot::usage="DotPlot[\!\(\*SubscriptBox[
StyleBox[\"seq\", \"TI\"], \(1\)]\)\!\(\*
StyleBox[\",\", \"TI\"]\)\!\(\*
StyleBox[\" \", \"TI\"]\)\!\(\*SubscriptBox[
StyleBox[\"seq\", \"TI\"], \(2\)]\)] plots a dot plot of the two sequences \!\(\*SubscriptBox[
StyleBox[\"seq\", \"TI\"], \(1\)]\) and \!\(\*SubscriptBox[
StyleBox[\"seq\", \"TI\"], \(2\)]\). The option WindowSize takes a default value of one. All other options are inherited from ArrayPlot such as FrameLabel.";


EigenvectorPlot::usage="EigenvectorPlot[\!\(\*
StyleBox[\"data\", \"TI\"]\)] displays an eigenvector plot of \!\(\*
StyleBox[\"data\", \"TI\"]\).";


EpicycloidPlot::usage="EpicycloidPlot[\!\(\*
StyleBox[\"R\", \"TI\"]\)\!\(\*
StyleBox[\",\", \"TI\"]\)\!\(\*
StyleBox[\" \", \"TI\"]\)\!\(\*
StyleBox[\"r\", \"TI\"]\)\!\(\*
StyleBox[\",\", \"TI\"]\)\!\(\*
StyleBox[\" \", \"TI\"]\)\!\(\*
StyleBox[\"\[Theta]\", \"TI\"]\)] displays a plot of a epicycloid generated by rolling a circle of radius \!\(\*
StyleBox[\"r\", \"TI\"]\) outside of a fixed circle of radius \!\(\*
StyleBox[\"R\", \"TI\"]\). The angle \[Theta] is the parameter that determines how far along the curve to sketch.";


Hypocycloid::usage="Hypocycloid[{\!\(\*
StyleBox[\"R\", \"TI\"]\), \!\(\*
StyleBox[\"r\", \"TI\"]\)}, \[Theta]] generates a hypocycloid curve with the radius of the fixed outside circle given by \!\(\*
StyleBox[\"R\", \"TI\"]\) and the radius of the rotating inner circle given by \!\(\*
StyleBox[\"r\", \"TI\"]\). The angle of rotation is given by the paramter \[Theta].";


HypocycloidPlot::usage="HypocycloidPlot[\!\(\*
StyleBox[\"R\", \"TI\"]\)\!\(\*
StyleBox[\",\", \"TI\"]\)\!\(\*
StyleBox[\" \", \"TI\"]\)\!\(\*
StyleBox[\"r\", \"TI\"]\)\!\(\*
StyleBox[\",\", \"TI\"]\)\!\(\*
StyleBox[\" \", \"TI\"]\)\!\(\*
StyleBox[\"\[Theta]\", \"TI\"]\)] displays a plot of a hypocycloid generated by rolling a circle of radius \!\(\*
StyleBox[\"r\", \"TI\"]\) inside of a fixed circle of radius \!\(\*
StyleBox[\"R\", \"TI\"]\). The angle \[Theta] is the parameter that determines how far along the curve to sketch.";


Lattice3D::usage="Lattice3D[{\!\(\*
StyleBox[\"xmin\", \"TI\"]\), \!\(\*
StyleBox[\"xmax\", \"TI\"]\)}, {\!\(\*
StyleBox[\"ymin\", \"TI\"]\), \!\(\*
StyleBox[\"ymax\", \"TI\"]\)}, {\!\(\*
StyleBox[\"zmin\", \"TI\"]\), \!\(\*
StyleBox[\"zmax\", \"TI\"]\)}] displays a three-dimensional lattice in space.";


PathPlot::usage="PathPlot[\!\(\*
StyleBox[\"lis\", \"TI\"]\)] displays a plot consisting of a line connecting each coordinate point in \!\(\*
StyleBox[\"lis\", \"TI\"]\) in order.";


RandomCompose::usage="RandomCompose[\!\(\*
StyleBox[\"n\", \"TI\"]\), \!\(\*
StyleBox[\"instr\", \"TI\"]\)] generates an uncorrelated set of  \!\(\*
StyleBox[\"n\", \"TI\"]\) tones using the MIDI instrument \!\(\*
StyleBox[\"instr\", \"TI\"]\).";


RandomWalkPi::usage="RandomWalkPi[\!\(\*
StyleBox[\"n\", \"TI\"]\), \!\(\*
StyleBox[\"b\", \"TI\"]\)] generates \!\(\*
StyleBox[\"n\", \"TI\"]\) steps of a random walk on the base \!\(\*
StyleBox[\"b\", \"TI\"]\) digits of \[Pi].";


RootPlot::usage="RootPlot[\!\(\*
StyleBox[\"fun\", \"TI\"]\), {\!\(\*
StyleBox[\"x\", \"TI\"]\), \!\(\*
StyleBox[\"xmin\", \"TI\"]\), \!\(\*
StyleBox[\"xmax\", \"TI\"]\)}] plots the function \!\(\*
StyleBox[\"fun\", \"TI\"]\) together with its roots over the interval from \!\(\*
StyleBox[\"xmin\", \"TI\"]\) to \!\(\*
StyleBox[\"xmax\", \"TI\"]\).";


SimplePath::usage="SimplePath[\!\(\*
StyleBox[\"lis\", \"TI\"]\)] finds a simple closed path through the two-dimensional points, \!\(\*
StyleBox[\"lis\", \"TI\"]\).";


StandardDeviationPlot::usage="StandardDeviationPlot[\!\(\*
StyleBox[\"data\", \"TI\"]\), \!\(\*
StyleBox[\"sd\", \"TI\"]\)] plots \!\(\*
StyleBox[\"data\", \"TI\"]\) where points within one standard deviation are colored differently than those more than one standard deviation from the mean. The second argument, sd, is 1 by default and can set to any standard deviation value.";


TriangleArea::usage="TriangleArea[{\!\(\*SubscriptBox[
StyleBox[\"v\", \"TI\"], \(1\)]\),\!\(\*SubscriptBox[
StyleBox[\"v\", \"TI\"], \(2\)]\),\!\(\*SubscriptBox[
StyleBox[\"v\", \"TI\"], \(3\)]\)}] computes the area of the triangle given by the three vertices \!\(\*SubscriptBox[
StyleBox[\"v\", \"TI\"], \(1\)]\), \!\(\*SubscriptBox[
StyleBox[\"v\", \"TI\"], \(2\)]\), and \!\(\*SubscriptBox[
StyleBox[\"v\", \"TI\"], \(3\)]\).";


VennDiagram::usage="VennDiagram[\!\(\*
StyleBox[\"expr\", \"TI\"]\),\!\(\*
StyleBox[\"vars\", \"TI\"]\)] creates and displays a Venn diagram of the logical expression \!\(\*
StyleBox[\"expr\", \"TI\"]\) in the variables given as a list, \!\(\*
StyleBox[\"vars\", \"TI\"]\). The logical expression can be in either two or three variables.";


Options[CentroidPlot]=Options[Graphics];


Options[ComplexListPlot]=Options[ListPlot];


Options[ConvexHullPlot]=Join[{Dimension->2},Options[Graphics],Options[Graphics3D]];


Options[DotPlot]=Join[{WindowSize->1},Options[ArrayPlot]];


Options[PathPlot]=Join[{ClosedPath->True},Options[Graphics]];


Options[RootPlot]=Join[Options[NSolve],Options[Plot]];


ConvexHullPlot::baddim="The value `1` of the Dimension option should be either 2 or 3";


CentroidPlot::collinpts="The points `1` are collinear, giving a degenerate triangle.";


Begin["`Private`"]


AminoAcidPlot[aa_String,diagram_:"ColorStructureDiagram"]:=Labeled[Framed[ChemicalData[aa,diagram],ImageSize->All],ChemicalData[aa,"Name"],LabelStyle->Directive["Menu",9]]


CentroidPlot[Triangle[{p1_,p2_,p3_}],opts:OptionsPattern[Graphics]]:=
If[TriangleArea[{p1,p2,p3}]==0,Message[CentroidPlot::collinpts,{p1,p2,p3}],

Graphics[{
{LightBlue,EdgeForm[Blue],Triangle[{p1,p2,p3}]},
{Blue,PointSize[Medium],Point[{p1,p2,p3}]},
{Red,PointSize[Medium],Point@RegionCentroid[Triangle[{p1,p2,p3}]]},
{Gray,TriangleMedians[Triangle[{p1,p2,p3}]],PointSize[Medium],Point[(#1+#2)/2&@@@Subsets[{p1,p2,p3},{2}]]}
},opts]
]


ChemicalSpaceFillingPlot[file_String]:=Module[{elements,pos,radii,names,colors,labels},
{pos,elements}=First/@Import[file,{{"VertexCoordinates","VertexTypes"}}];
radii=QuantityMagnitude@Map[ElementData[#,"VanDerWaalsRadius"]&,elements];

labels=DeleteDuplicates[elements];
names=ElementData[#,"StandardName"]&/@labels;
colors=labels/.ColorData["Atoms","ColorRules"];

Legended[
Graphics3D[{Specularity[White,50],
MapThread[{ColorData["Atoms",#1],Sphere[#2,#3]}&,{elements,pos,radii}]
},Lighting->"Neutral"],
SwatchLegend[colors,names,LegendMarkers->"SphereBubble"]
]]


colorWheel[n_]:=Graphics[({Hue[Rescale[#,{0,2\[Pi]}]],Disk[{0,0},1,{#,#+ n}]}&)/@Range[0,2 \[Pi],n]]


ComplexListPlot[points_,opts:OptionsPattern[]]:=
ListPlot[Map[{Re[#],Im[#]}&,points],opts,PlotStyle->{Red,PointSize[Medium]},AxesLabel->{"Re","Im"},LabelStyle->Directive["Menu"]]


ComplexRootPlot[poly_,z_,opts:OptionsPattern[]]:=ComplexListPlot[z/.NSolve[poly==0,z],opts,AspectRatio->Automatic]


ConvexHullPlot[pts_,opts:OptionsPattern[]]:=Module[{\[ScriptCapitalR],dim=OptionValue[Dimension]},
\[ScriptCapitalR]=ConvexHullMesh[pts];
Which[
dim==2,Show[{\[ScriptCapitalR],Graphics[{Point[pts],Red,PointSize[Medium],MeshPrimitives[\[ScriptCapitalR],0]}]},
FilterRules[{opts},Options[Graphics]]],
dim==3,Show[{\[ScriptCapitalR],Graphics3D[{Point[pts],Red,PointSize[Medium],MeshPrimitives[\[ScriptCapitalR],0]}]},
FilterRules[{opts},Options[Graphics3D]]],
True,Message[ConvexHullPlot::baddim,dim]
]
]


DotPlot[p1_,p2_,opts:OptionsPattern[]]:=Module[{w=OptionValue[WindowSize]},
ArrayPlot[Outer[Boole[#1==#2]&,stringPartition[p1,w,1,1,{}],stringPartition[p2,w,1,1,{}]],
FilterRules[{opts},Options@ArrayPlot],Frame->True]]


(* For large data (>10^5), the following is slow; *)(* better to use GraphicsComplex version below *)

(*
EigenvectorPlot[data:{{_,_}..},tensor_,opts:OptionsPattern[ListLinePlot]]:=Module[{T=tensor,cmx,cmy,\[Lambda]1,\[Lambda]2,v1x,v1y,v2x,v2y},
{\[Lambda]1,\[Lambda]2}=Eigenvalues[T];
{cmx,cmy}=Mean[data];
{{v1x,v1y},{v2x,v2y}}=Eigenvectors[T];
Show[{
ListLinePlot[data,opts,PlotStyle\[Rule]Thin],
Graphics[{
Line[{{cmx-\[Lambda]1,cmy-(v1y \[Lambda]1)/v1x},{cmx+\[Lambda]1,cmy+(v1y \[Lambda]1)/v1x}}],
Line[{{cmx-\[Lambda]2,cmy-(v2y \[Lambda]2)/v2x},{cmx+\[Lambda]2,cmy+(v2y \[Lambda]2)/v2x}}],
PointSize[Large],Red,Point@Mean[data]}]
},AspectRatio\[Rule]Automatic]]
*)


EigenvectorPlot[data:{{_,_}..},tensor_,opts:OptionsPattern[Graphics]]:=Module[{T=tensor,cmx,cmy,\[Lambda]1,\[Lambda]2,v1x,v1y,v2x,v2y},
{\[Lambda]1,\[Lambda]2}=Eigenvalues[T];
{cmx,cmy}=Mean[data];
{{v1x,v1y},{v2x,v2y}}=Eigenvectors[T];
Graphics[GraphicsComplex[data,{
RGBColor[0.368417,0.506779,0.709798],Thickness[.001],Line@Range[Length[data]]
}],
opts,Axes->Automatic,Epilog->{
Line[{{cmx-\[Lambda]1,cmy-(v1y \[Lambda]1)/v1x},{cmx+\[Lambda]1,cmy+(v1y \[Lambda]1)/v1x}}],
Line[{{cmx-\[Lambda]2,cmy-(v2y \[Lambda]2)/v2x},{cmx+\[Lambda]2,cmy+(v2y \[Lambda]2)/v2x}}],
PointSize[Large],Red,Point@{cmx,cmy}}]
]


EpicycloidPlot[R_,r_,\[Theta]_]:=Module[{epicycloid,center},
epicycloid[{a_,b_},t_]:={(a+b)Cos[t]-b Cos[t (a+b)/b],(a+b)Sin[t]+b Sin[t (a+b)/b]};center[th_,R1_,r2_]:=(R1+r2){Cos[th],Sin[th]};
Show[{
ParametricPlot[epicycloid[{R,r},t],{t,0,\[Theta]},PlotStyle->Red,Axes->None],
Graphics[{
{Blue,Thick,Circle[{0,0},R]},
{Circle[center[\[Theta],R,r],r]},
{PointSize[.015],Point[center[\[Theta],R,r]]},
{Thick,Line[{center[\[Theta],R,r],epicycloid[{R,r},\[Theta]]}]},
{Red,PointSize[.015],Point[epicycloid[{R,r},\[Theta]]]}
}]},PlotRange->1.5(R+r),GridLines->Automatic]]


Hypocycloid[{a_,b_},\[Theta]_]:={(a-b)Cos[\[Theta]]+b Cos[\[Theta] (a-b)/b],(a-b)Sin[\[Theta]]-b Sin[\[Theta] (a-b)/b]}


HypocycloidPlot[R_,r_,\[Theta]_,opts:OptionsPattern[Graphics]]:=Module[{center},

center[th_,R1_,r2_]:=(R1-r2) {Cos[th],Sin[th]};

Show[{ParametricPlot[Hypocycloid[{R,r},t],{t,0,\[Theta]},PlotStyle->Red,Axes->None],

Graphics[{{Blue,Thickness[Medium],Circle[{0,0},R]},{Circle[center[\[Theta],R,r],r]},{PointSize[.02],Point[center[\[Theta],R,r]]},{Thick,Line[{center[\[Theta],R,r],Hypocycloid[{R,r},\[Theta]]}]},{Red,PointSize[.02],Point[Hypocycloid[{R,r},\[Theta]]]}}]},
opts,
PlotRange->All,GridLines->Automatic]
]


Lattice3D[{xmin_,xmax_},{ymin_,ymax_},{zmin_,zmax_},opts:OptionsPattern[Graphics3D]]:=Module[{gridX,gridY,gridZ},gridX=Table[{{xmin,y,z},{xmax,y,z}},{y,ymin,ymax},{z,zmin,zmax}];
gridY=Table[{{x,ymin,z},{x,ymax,z}},{x,xmin,xmax},{z,zmin,zmax}];
gridZ=Table[{{x,y,zmin},{x,y,zmax}},{x,xmin,xmax},{y,ymin,ymax}];
Graphics3D[{
Map[Line,gridX],
Map[Line,gridY],
Map[Line,gridZ]
},opts,Boxed->False]
]


PathPlot[lis_List,opts:OptionsPattern[]]:=Module[{coords=lis},If[OptionValue[ClosedPath],coords=coords/. {a_,b__}:>{a,b,a}];Graphics[{Line[coords],PointSize[Medium],Red,Point[coords]},FilterRules[{opts},Options[Graphics]]]]


RandomWalkPi[d_,base_/;base>2]:=Module[{digits,angles,rules},
digits=First[RealDigits[N[\[Pi],d],base]];
angles=Rest@Range[0.,2\[Pi],2\[Pi]/(base)];rules=MapThread[#1->#2&,{Range[0,base-1],angles}];
Accumulate[Map[{Cos[#],Sin[#]}&,digits/.rules]]
]


RootPlot[fun_,{var_,varmin_,varmax_},opts:OptionsPattern[]]:=Module[{f=fun},
Plot[f,{var,varmin,varmax},
opts,
Mesh->{{0}},MeshFunctions->{f/.var->#&},
MeshStyle->{Red,PointSize[Medium]}]]


SimplePath[lis_List]:=Module[{base,angle,sorted},
base=First[SortBy[lis,Last]];
angle[a_,b_]:=ArcTan@@(b-a);
sorted=Sort[Complement[lis,{base}],angle[base,#1]<=angle[base,#2]&];Join[{base},sorted]]


StandardDeviationPlot[data_?VectorQ,n_:1,opts:OptionsPattern[ListPlot]]:= 
Module[{in,out,len=Length[data],lenrange,\[Mu]=Mean[data],\[Sigma]=StandardDeviation[data]},
lenrange=Range[Length[data]];
in=Pick[lenrange,Thread[Abs[(data-\[Mu])/\[Sigma]]<n]];
out=Complement[lenrange,in];
in=If[Length[in]===0,{Missing[]},Transpose[{in,data[[in]]}]];
out=If[Length[out]===0,{Missing[]},Transpose[{out,data[[out]]}]];
ListPlot[{in,out},
opts,
PlotStyle->{Blue,Pink},
PlotRange->All,
Epilog->{Dashed,
Line[{{0,\[Mu]+n \[Sigma]},{len,\[Mu]+n \[Sigma]}}],
Line[{{0,\[Mu]-n \[Sigma]},{len,\[Mu]-n \[Sigma]}}]}
]
]


TriangleArea[tri:{v1_,v2_,v3_}]:=Det[Map[PadRight[#,3,1]&,tri]]/2


VennDiagram[f_Symbol,vars:{A_,B_}]:=Module[{eqns,x,y,c1={-.5,0},c2={.5,0}},
eqns=Apply[(#1+x)^2+(#2+y)^2<1&,{c1,c2},{1}];
Show[
RegionPlot[Apply[f,eqns],{x,-2,2},{y,-2,2},Frame->True,FrameTicks->None,PlotLabel->f@@vars,AspectRatio->Automatic,PlotRange->{{-2,2},{-1.2,1.2}},MaxRecursion->5],
Graphics[{Circle[c1],Circle[c2],
Text[First[vars],{-.5,.75}],Text[Last[vars],{.5,.75}]}]
]]


VennDiagram[expr_,vars:{__}/;Length[vars]==2]:=Module[{c1,c2,regions,x,y,f},
{c1,c2}={{-.5,0},{.5,0}};
regions=(x-#1)^2+(y-#2)^2<1&@@@{c1,c2};
f=expr/.Thread[vars->{#1,#2}]&;
Show[{
RegionPlot[f@@regions,{x,-2,2},{y,-1.2,1.2},AspectRatio->Automatic,FrameTicks->None,FrameLabel->TraditionalForm[expr],
LabelStyle->Directive[8]],
Graphics[{Circle[c1],Circle[c2],
Text[vars[[1]],{-.5,.75}],Text[vars[[2]],{.5,.75}]}]
}]]


VennDiagram[expr_,vars:{__}/;Length[vars]==3]:=Module[{c1,c2,c3,regions,x,y,f},
{c1,c2,c3}={{-.5,0},{.5,0},{0,-1}};
regions=(x-#1)^2+(y-#2)^2<1&@@@{c1,c2,c3};
f=expr/.Thread[vars->{#1,#2,#3}]&;
Show[{
RegionPlot[f@@regions,{x,-2,2},{y,-2.2,1.2},AspectRatio->Automatic,FrameTicks->None,FrameLabel->TraditionalForm[expr],
LabelStyle->Directive[8]],
Graphics[{Circle[c1],Circle[c2],Circle[c3],
Text[vars[[1]],{-.5,.75}],Text[vars[[2]],{.5,.75}],Text[vars[[3]],{0,-1.75}]}]
}]]


End[]


(*EndPackage[]*)



