Ask Your Question

Plot with no scale on the y axis

asked 2021-06-04 02:21:11 +0200

step gravatar image

If I plot a function that generates huge numbers, then sage normalizes it between -1 and 1. I don't like this behaviour because it hides the real values on the y scale.

For example, if I do

plot(10^6 * x, -1, 1)

what I get is a plot between -1 and 1 on both the axis. Is there a way to have the values on the y axis with the right scale?

edit retag flag offensive close merge delete


IMNSHO, this is a (minor) bug in plot, and should be reported as such...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2021-06-04 08:57:21 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-06-04 03:55:05 +0200

cav_rt gravatar image

If you set frame = True the scale is displayed at the upper left corner.

plot(10^6 * x, -1, 1, frame=True)

Another possibility is

plot(10^6 * x, -1, 1, tick_formatter='latex')
edit flag offensive delete link more


Thank you, this totally solves my problem!

step gravatar imagestep ( 2021-06-04 04:25:05 +0200 )edit

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: 2021-06-04 02:21:11 +0200

Seen: 1,897 times

Last updated: Jun 04 '21