ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 04 Jun 2021 08:57:21 +0200Plot with no scale on the y axishttps://ask.sagemath.org/question/57439/plot-with-no-scale-on-the-y-axis/ 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?Fri, 04 Jun 2021 02:21:11 +0200https://ask.sagemath.org/question/57439/plot-with-no-scale-on-the-y-axis/Comment by Emmanuel Charpentier for <p>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.</p>
<p>For example, if I do</p>
<pre><code>plot(10^6 * x, -1, 1)
</code></pre>
<p>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?</p>
https://ask.sagemath.org/question/57439/plot-with-no-scale-on-the-y-axis/?comment=57447#post-id-57447IMNSHO, this is a (minor) bug in `plot`, and should be reported as such...Fri, 04 Jun 2021 08:57:21 +0200https://ask.sagemath.org/question/57439/plot-with-no-scale-on-the-y-axis/?comment=57447#post-id-57447Answer by cav_rt for <p>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.</p>
<p>For example, if I do</p>
<pre><code>plot(10^6 * x, -1, 1)
</code></pre>
<p>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?</p>
https://ask.sagemath.org/question/57439/plot-with-no-scale-on-the-y-axis/?answer=57440#post-id-57440If 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')Fri, 04 Jun 2021 03:55:05 +0200https://ask.sagemath.org/question/57439/plot-with-no-scale-on-the-y-axis/?answer=57440#post-id-57440Comment by step for <p>If you set <code>frame = True</code> the scale is displayed at the upper left corner.</p>
<pre><code>plot(10^6 * x, -1, 1, frame=True)
</code></pre>
<p>Another possibility is </p>
<pre><code>plot(10^6 * x, -1, 1, tick_formatter='latex')
</code></pre>
https://ask.sagemath.org/question/57439/plot-with-no-scale-on-the-y-axis/?comment=57441#post-id-57441Thank you, this totally solves my problem!Fri, 04 Jun 2021 04:25:05 +0200https://ask.sagemath.org/question/57439/plot-with-no-scale-on-the-y-axis/?comment=57441#post-id-57441