[sage-support] bug in plot?

2024-03-14 Thread David Joyner
Hi: I'm trying to show my students a plot of a rational function whose graph is basically 1, so I plotted f(x) = (x^2+0.0001)/(x^2+0.000101) However, there is a problem: Note the difference between plot((x^2+0.0001)/(x^2+0.000101), (x,-10,10)) (which dips down near x=0) and plot((x^2+0.000

[sage-support] Bug in plot?

2009-03-18 Thread adrian
If i try to do plot(cos(x),(x,-3,3)) in sage 3.4 (through the internet version) it brakes with the message TypeError: a float is required The command worked in sage 3.3 Also, in the notebook sphere() produces nothing; but (sphere()).show() launches the jmol applet as desired. I don't know if

[sage-support] Bug in plot?

2008-09-26 Thread Jason Bandlow
Hi all, A student of mine noticed the following and it looks like a bug to me (at least with the documentation). >From the notebook with 3.1.2 (sage prompts added for readability): sage: plot? File: /home/jason/sage/local/lib/python2.5/site-packages/sage/plot/plot.py Type: Defi

Re: [sage-support] bug in plot?

2024-03-14 Thread Dima Pasechnik
It might help seeing your graphs here, too. On Thu, Mar 14, 2024 at 10:04 AM David Joyner wrote: > Hi: > > I'm trying to show my students a plot of > a rational function whose graph is basically 1, > so I plotted > f(x) = (x^2+0.0001)/(x^2+0.000101) > However, there is a problem: Note the di

Re: [sage-support] bug in plot?

2024-03-14 Thread kcrisman
On Thursday, March 14, 2024 at 10:35:50 AM UTC-4 dim...@gmail.com wrote: It might help seeing your graphs here, too. Try this: https://sagecell.sagemath.org/?z=eJxL06jQVLBV0KiIM9I20DMwMDDU1EfiGBiAhXi5fICKojUq9IEiOgppEIampkJafpFChUJmnkJRYl56qoYuWBokFcvLlZNZXBJfkJNfouGjqYAVKCsklabb83IpIynVUajMz

Re: [sage-support] bug in plot?

2024-03-14 Thread David Joyner
On Thu, Mar 14, 2024 at 1:51 PM kcrisman wrote: > > > On Thursday, March 14, 2024 at 10:35:50 AM UTC-4 dim...@gmail.com wrote: > > It might help seeing your graphs here, too. > > > Try this: > > > https://sagecell.sagemath.org/?z=eJxL06jQVLBV0KiIM9I20DMwMDDU1EfiGBiAhXi5fICKojUq9IEiOgppEIampkJafpF

Re: [sage-support] bug in plot?

2024-03-14 Thread David Joyner
On Thu, Mar 14, 2024 at 10:35 AM Dima Pasechnik wrote: > It might help seeing your graphs here, too. > It is attached, Dima. Note that the correct graph should be (for all practical purposes) simply the plot of the constant function 1 for all x. [image: bug-in-plot-of-rational-function.jpg]

Re: [sage-support] bug in plot?

2024-03-14 Thread Nils Bruin
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/sag

Re: [sage-support] bug in plot?

2024-03-14 Thread Dima Pasechnik
On 14 March 2024 21:09:22 GMT, Nils Bruin 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

Re: [sage-support] bug in plot?

2024-03-14 Thread Dima Pasechnik
On Thu, Mar 14, 2024 at 9:32 PM Dima Pasechnik wrote: > > > On 14 March 2024 21:09:22 GMT, Nils Bruin 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 sh

Re: [sage-support] bug in plot?

2024-03-14 Thread Dima Pasechnik
On Fri, Mar 15, 2024 at 12:15 AM Dima Pasechnik wrote: > > > On Thu, Mar 14, 2024 at 9:32 PM Dima Pasechnik wrote: > >> >> >> On 14 March 2024 21:09:22 GMT, Nils Bruin wrote: >> >I get the impression that without setting ymin,ymax you just end up with >> a >> >tiny range for the y-axis and its

Re: [sage-support] bug in plot?

2024-03-15 Thread David Joyner
On Thu, Mar 14, 2024 at 8:17 PM Dima Pasechnik wrote: > > > On Fri, Mar 15, 2024 at 12:15 AM Dima Pasechnik wrote: > >> >> >> On Thu, Mar 14, 2024 at 9:32 PM Dima Pasechnik wrote: >> >>> >>> >>> On 14 March 2024 21:09:22 GMT, Nils Bruin wrote: >>> >I get the impression that without setting ymi

Re: [sage-support] bug in plot?

2024-03-15 Thread Dima Pasechnik
On Fri, Mar 15, 2024 at 9:13 AM David Joyner wrote: > > > On Thu, Mar 14, 2024 at 8:17 PM Dima Pasechnik wrote: > >> >> >> On Fri, Mar 15, 2024 at 12:15 AM Dima Pasechnik >> wrote: >> >>> >>> >>> On Thu, Mar 14, 2024 at 9:32 PM Dima Pasechnik >>> wrote: >>> On 14 March 2024 21:0

Re: [sage-support] bug in plot?

2024-03-15 Thread kcrisman
it's not a bug, it's a feature. :-) https://discourse.matplotlib.org/t/default-format-of-axis-offset-label/23162/2 Correct. import matplotlib as mpl mpl.rcParams['axes.formatter.useoffset'] = False plot((x^2+0.0001)/(x^2+0.000101), (x,-0.1,0.1)) produces the normal labelling of y-axes, wi

Re: [sage-support] bug in plot?

2024-03-15 Thread Dima Pasechnik
On 15 March 2024 19:42:48 GMT, kcrisman wrote: > > >it's not a bug, it's a feature. :-) >https://discourse.matplotlib.org/t/default-format-of-axis-offset-label/23162/2 > > >Correct. > >import matplotlib as mpl >mpl.rcParams['axes.formatter.useoffset'] = False >plot((x^2+0.0001)/(x^2+0.00010

Re: [sage-support] bug in plot?

2024-03-15 Thread Nils Bruin
On Friday 15 March 2024 at 12:42:49 UTC-7 kcrisman wrote: Or rather, should the default be useoffset False? Yes, I think that would be reasonable to do. Clearly, offsets being used without the user knowing they exist can easily lead to confusion and misinterpreting the graph, as had been demon

Re: [sage-support] bug in plot?

2024-03-16 Thread Dima Pasechnik
On Fri, Mar 15, 2024 at 9:44 PM Nils Bruin wrote: > On Friday 15 March 2024 at 12:42:49 UTC-7 kcrisman wrote: > > Or rather, should the default be useoffset False? > > > Yes, I think that would be reasonable to do. Clearly, offsets being used > without the user knowing they exist can easily lead

Re: [sage-support] bug in plot?

2024-03-16 Thread kcrisman
I'd think that matplotlib's defaults are defaults for a good reason. Agreed, but not a good *mathematical* reason. It is a good *data analysis* reason (appropriate for mpl), which is not the same thing. I can't think of a single mathematics textbook, talk, or other purely mathematical setti

[sage-support] bug in plot ('e' becomes undefined)

2008-10-16 Thread Stan Schymanski
Dear all, For some strange reason plot loses its understanding of the system variable 'e' if I try to plot an exponential function and do a .subs(locals()) within the plot command. The meaning of 'e' is not modified in the name space, but its value becomes unavailable to plot only. See below for

[sage-support] bug in plot of 2^x?

2007-12-30 Thread David Joyner
Hi: sage: P = plot(e^(ln(2)*x),-1,1) works fine (note: e^(ln(2)*x) = 2^x) but sage: P = plot(2^x,-1,1) WARNING: When plotting, failed to evaluate function at 201 points. Last error message: 'exponent (=1.0) must be an integer. Coerce your numbers to real or complex numbers first.' -

[sage-support] bug in plot? Global constants seen as variables.

2009-02-09 Thread Stan Schymanski
Dear all, For some reason, the meaning of the global constants pi and e (and maybe others) becomes unavailable to the plot command in the following example. Is this a bug? -- | Sage Version 3.2, Release Date: 2008-11-20