On Fri, Mar 15, 2024 at 9:13 AM David Joyner <wdjoy...@gmail.com> wrote:

>
>
> On Thu, Mar 14, 2024 at 8:17 PM Dima Pasechnik <dimp...@gmail.com> wrote:
>
>>
>>
>> On Fri, Mar 15, 2024 at 12:15 AM Dima Pasechnik <dimp...@gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Thu, Mar 14, 2024 at 9:32 PM Dima Pasechnik <dimp...@gmail.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On 14 March 2024 21:09:22 GMT, Nils Bruin <nbr...@sfu.ca> wrote:
>>>> >I get the impression that without setting ymin,ymax you just end up
>>>> with a
>>>> >tiny range for the y-axis and its labelling is just very weird. I
>>>> think the
>>>> >labels displayed are shifted and scaled. So the error is just how the
>>>> >labels are printed. That looks the same as
>>>> >https://github.com/sagemath/sage/issues/34233
>>>> >
>>>>
>>>> Good catch! So it seems indeed the same story, just on the microscale.
>>>> With the patch from #34233 I get essentially the same graph, but with extra
>>>> 10^-9
>>>> or something like this printed above the graph.
>>>> So when x is very close to 0 one indeed sees this "sharp" drop, by 10^9
>>>> or something...
>>>>
>>>> >The default behaviour would be to derive ymin and ymax from the
>>>> sampled
>>>> >points, and in your point plot example, those values vary from 1-1e-6
>>>> to
>>>> >1+0e-6. So I think the range is derived appropriately. The labels on
>>>> the
>>>> >y-axis are just printed in a misguided way.
>>>>
>>>
>>> Attached in the plot with x in [-0.1,0.1] - and it is actually OK, I
>>> think the minimum (with x=0) is where it should be, at 0.9999990...
>>>
>> I meant  0.9999990 x 10^-6, as indicated on the label.
>>
>
> That's good news, that it's just a matplotlib bug in the labeling of the
> y-axis in the default case.
>

it's not a bug, it's a feature. :-)
https://discourse.matplotlib.org/t/default-format-of-axis-offset-label/23162/2

indeed,


import matplotlib as mpl
mpl.rcParams['axes.formatter.useoffset'] = False
plot((x^2+0.0001)/(x^2+0.0001000001), (x,-0.1,0.1))

produces the normal labelling of y-axes, without an offset.
Perhaps we should have an example like this in the manual.


HTH
Dima



>
> Thanks everyone!
>
>
>>
>> It's a bit  confusing that the y-axis is labelled this way, but the
>>> offset of +1 is indicated at the
>>> label above.
>>>
>>> Dima
>>>
>>>
>>>> >
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sage-support+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-support/CAAWYfq2qWATF3Jkx_RjvF_BeK1tOD_ge3kUV7eNFtTtm8oK8qg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/sage-support/CAAWYfq2qWATF3Jkx_RjvF_BeK1tOD_ge3kUV7eNFtTtm8oK8qg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/CAEQuuAW6GJUaeJYds-sSJ4qktrid0U5Hn%2ByKdV684MUBWb6z6Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/sage-support/CAEQuuAW6GJUaeJYds-sSJ4qktrid0U5Hn%2ByKdV684MUBWb6z6Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq12aJ370ymT6%2BS-o4xgLsb_sp94aXrgGpLXyYdDgnTWUw%40mail.gmail.com.

Reply via email to