summaryrefslogtreecommitdiff
path: root/graphics/asymptote/doc/monthaxis.asy
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/doc/monthaxis.asy
Initial commit
Diffstat (limited to 'graphics/asymptote/doc/monthaxis.asy')
-rw-r--r--graphics/asymptote/doc/monthaxis.asy17
1 files changed, 17 insertions, 0 deletions
diff --git a/graphics/asymptote/doc/monthaxis.asy b/graphics/asymptote/doc/monthaxis.asy
new file mode 100644
index 0000000000..d2c8bf3298
--- /dev/null
+++ b/graphics/asymptote/doc/monthaxis.asy
@@ -0,0 +1,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));