summaryrefslogtreecommitdiff
path: root/Master/texmf/doc/asymptote/examples/brokenaxis.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/doc/asymptote/examples/brokenaxis.asy')
-rw-r--r--Master/texmf/doc/asymptote/examples/brokenaxis.asy25
1 files changed, 25 insertions, 0 deletions
diff --git a/Master/texmf/doc/asymptote/examples/brokenaxis.asy b/Master/texmf/doc/asymptote/examples/brokenaxis.asy
new file mode 100644
index 00000000000..9de9fa414d3
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/brokenaxis.asy
@@ -0,0 +1,25 @@
+import graph;
+
+size(200,150,IgnoreAspect);
+
+// Break the x axis at 3; restart at 8:
+real a=3, b=8;
+
+// Break the y axis at 100; restart at 1000:
+real c=100, d=1000;
+
+scale(Broken(a,b),BrokenLog(c,d));
+
+real[] x={1,2,4,6,10};
+real[] y=x^4;
+
+draw(graph(x,y),red,MarkFill[0]);
+
+xaxis("$x$",BottomTop,LeftTicks(Break(a,b)));
+yaxis("$y$",LeftRight,RightTicks(Break(c,d)));
+
+label(rotate(90)*Break,(a,point(S).y));
+label(rotate(90)*Break,(a,point(N).y));
+label(Break,(point(W).x,ScaleY(c)));
+label(Break,(point(E).x,ScaleY(c)));
+