Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log scaling not applied #31

Closed
srtaylor opened this issue Nov 25, 2016 · 2 comments
Closed

Log scaling not applied #31

srtaylor opened this issue Nov 25, 2016 · 2 comments

Comments

@srtaylor
Copy link

srtaylor commented Nov 25, 2016

Log-Log scaling on currentpicture works for me as expected, but not on any other picture. E.g. this minimal example works as expected:
import graph;
scale(Log,Log);
size(200,IgnoreAspect);
real f (real x) {return x^2;}
draw(graph( f, 1, 16 ) );
xaxis("$x$",BottomTop,RightTicks);
yaxis("$y$",LeftRight,LeftTicks);

but the following code (which should given identical output) does not: log scale isn't applied, and the axis ticks are wrong:
import graph;
picture pic;
scale(pic,Log,Log);
size(pic,200,IgnoreAspect);
real f (real x) {return x^2;}
draw(pic, graph( f, 1, 16 ) );
xaxis(pic,"$x$",BottomTop,RightTicks);
yaxis(pic,"$y$",LeftRight,LeftTicks);
shipout(pic);

I need to get this working so I can draw multiple graphs on one picture. Have I done something subtly wrong here?

@oguibe
Copy link

oguibe commented Nov 25, 2016

Hello

Please replace
draw(pic, graph( f, 1, 16 ) );
by
draw(pic, graph( pic,f, 1, 16 ) );

O.G.

@srtaylor
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants