Ask Your Question
1

implicit plot with different scales on x and y axes

asked 2018-02-14 05:03:13 +0100

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: //  i187.photobucket.com/albums/x207/pratarpersilja/scaling_unusable_zpsspbvecof.png

(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

Comments

1

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 08:29:27 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-02-14 08:26:05 +0100

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

Stats

Asked: 2018-02-14 05:03:13 +0100

Seen: 413 times

Last updated: Feb 14 '18