summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote/examples/monthaxis.asy
blob: d2c8bf3298fcc06f8cf2eec69c7c4edfd38ca425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import graph;

size(400,150,IgnoreAspect);

real[] x=sequence(12);
real[] y=sin(2pi*x/12);

scale(false);

string[] month={"Jan","Feb","Mar","Apr","May","Jun",
                "Jul","Aug","Sep","Oct","Nov","Dec"};

draw(graph(x,y),red,MarkFill[0]);

xaxis(BottomTop,LeftTicks(new string(real x) {
      return month[round(x % 12)];}));
yaxis("$y$",LeftRight,RightTicks(4));