Ask Your Question
0

Plot with no scale on the y axis

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

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

Comments

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 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Comments

Thank you, this totally solves my problem!

step gravatar imagestep ( 2021-06-04 04:25:05 +0100 )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

Stats

Asked: 2021-06-04 02:21:11 +0100

Seen: 2,108 times

Last updated: Jun 04 '21