diff options
Diffstat (limited to 'Build/source/utils/asymptote/doc/brokenaxis.asy')
-rw-r--r-- | Build/source/utils/asymptote/doc/brokenaxis.asy | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/doc/brokenaxis.asy b/Build/source/utils/asymptote/doc/brokenaxis.asy new file mode 100644 index 00000000000..9de9fa414d3 --- /dev/null +++ b/Build/source/utils/asymptote/doc/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))); + |