1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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)));
|