diff options
Diffstat (limited to 'Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy')
-rw-r--r-- | Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy b/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy new file mode 100644 index 00000000000..39f802f935d --- /dev/null +++ b/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy @@ -0,0 +1,32 @@ +import graph; + +size(9cm,6cm,IgnoreAspect); +string data="secondaryaxis.csv"; + +file in=input(data).line().csv(); + +string[] titlelabel=in; +string[] columnlabel=in; + +real[][] a=in.dimension(0,0); +a=transpose(a); +real[] t=a[0], susceptible=a[1], infectious=a[2], dead=a[3], larvae=a[4]; +real[] susceptibleM=a[5], exposed=a[6],infectiousM=a[7]; + +scale(true); + +draw(graph(t,susceptible,t >= 10 & t <= 15)); +draw(graph(t,dead,t >= 10 & t <= 15),dashed); + +xaxis("Time ($\tau$)",BottomTop,LeftTicks); +yaxis(Left,RightTicks); + +picture secondary=secondaryY(new void(picture pic) { + scale(pic,Linear(true),Log(true)); + draw(pic,graph(pic,t,infectious,t >= 10 & t <= 15),red); + yaxis(pic,Right,red,LeftTicks(begin=false,end=false)); + }); + +add(secondary); +label(shift(5mm*N)*"Proportion of crows",point(NW),E); + |