Ask Your Question

implicit plot with different scales on x and y axes

asked 2018-02-13 22:03:13 -0500

pratarpersilja gravatar image

Say I want to plot implicit_plot(x^2 + 10000*y^2 - 2, (x,-3,3), (y,-0.03,0.03)), or anything else where the interesting values of x and y varies over different orders of magnitude. At least on my machine, the result is a completely illegible png, squished into nothingness.

http: //

(I wasn't allowed to add clickable links).

Of course, in this particular case I could rewrite the expression manually until the x and y ranges are the same. In the case that inspired these experiments in the first place, that rewrite is not realistic to do by hand.

How do I force an implicit plot to not have the same number of pixels per numerical unit in x and y directions?

edit retag flag offensive close merge delete



Welcome to Ask Sage! Thank you for your question.

Posting links requires a minimum amount of karma. Good job including the link as code.

You get karma when other users upvote your questions or answers, and when you accept answers to questions you asked.

slelievre gravatar imageslelievre ( 2018-02-14 01:29:27 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-02-14 01:26:05 -0500

slelievre gravatar image

The aspect ratio (how many times to scale y with respect to x) can be specified.

An example (using lambda to avoid having to define x and y as symbolic variables):

sage: implicit_plot(lambda x, y: x^2 + 10000*y^2 - 2, (-3,3), (-0.03,0.03), aspect_ratio=10)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-02-13 22:03:13 -0500

Seen: 20 times

Last updated: Feb 14