Closed justonlyasy closed 2 years ago
Consider this code which is compiled on http://asymptote.ualberta.ca/
settings.render=10; import graph; import palette; import contour; size(350,350); pair a=(-6,-6); pair b=(6,6); real f(real x, real y) {return (x/5)^2+(y/3)^2;} int N=200; int Divs=16; defaultpen(.9bp); pen Tickpen=black; pen[] Palette=quantize(BWRainbow(),Divs); bounds range=image(f,a,b,3N,Palette,Divs); real[] Cvals=uniform(range.min,range.max,Divs); Cvals.pop(); draw(contour(f,a,b,Cvals,N),Tickpen+extendcap+beveljoin); crop(); limits(a-(0.3,0.3),b+(0.3,0.3)); xaxis("$x$",BottomTop,LeftTicks(Size=4,size=2)); yaxis("$y$",LeftRight,RightTicks(Size=4,size=2));
the svg ouput is while the png output is and the pdf output is
Your crop command is still in the wrong place. I will post one more update to your example in issue #263 that resolves this issue too.
Consider this code which is compiled on http://asymptote.ualberta.ca/
the svg ouput is while the png output is and the pdf output is