Re: [sage-devel] default "contours" option for implicit_plot
No it isn’t. But I would be glad if you opened a ticket for it. I was thinking of doing something about it when opening a ticket for matplotlib 1.5.1 but I am spread too thin at the moment. François > On 31/01/2016, at 00:14, Andrzej Giniewiczwrote: > > Hello, > > Setting countours to None makes implicit_plot for x==y do something > like http://picpaste.com/SqB3JiID.png - definitely wrong. > > When setting countours to something like in region_plot: > contours=[-1e307, 0, 1e307] - it gave expected result. Also setting it > to something like [-eps, +eps], where eps was small enough (like > smaller than line width) was ok. > > I think this is serious bug, at least for audience of my book (on > Sage, aimed at highschoolers). This is function we used quite a bit in > few chapters. Is this somewhere in Trac already? > > Regards, > Andrzej. > > On Sat, Jan 16, 2016 at 10:05 PM, Francois Bissey > wrote: >> >>> On 17/01/2016, at 09:57, kcrisman wrote: >>> >>> >>> >>> Does anyone knows why the default option for “contours” is >>> set to “(0,0)” in implicit_plot (sage/plot/contour_plot.py line 571-572)? >>> Instead of being left alone to “None”. >>> >>> >>> I imagine that is what someone set it to long ago either in copying from >>> something else or because it made things "look right" in some situation. >>> If you try a wide variety of implicit plots with None and everything seems >>> to be exactly the same, then this seems like a reasonable change. I don't >>> know the history here, though (or I have forgotten it). >>> >> >> Yes a long time ago. I have no idea if it will look the same but >> matplotlib now says it is wrong to use it that way so it will have >> to change one way or another. >> Setting things to “None" make the dockets pass but I have no idea >> of what it looks like. Won’t be able to really look at pictures until >> Thursday. >> >> François >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-devel" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-devel+unsubscr...@googlegroups.com. >> To post to this group, send email to sage-devel@googlegroups.com. >> Visit this group at https://groups.google.com/group/sage-devel. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] default "contours" option for implicit_plot
I mentioned this thread on http://trac.sagemath.org/ticket/19988, together with proposed solution. Regards, Andrzej. On Sat, Jan 30, 2016 at 8:19 PM, Francois Bisseywrote: > No it isn’t. But I would be glad if you opened a ticket for it. I was > thinking of > doing something about it when opening a ticket for matplotlib 1.5.1 but > I am spread too thin at the moment. > > François > >> On 31/01/2016, at 00:14, Andrzej Giniewicz wrote: >> >> Hello, >> >> Setting countours to None makes implicit_plot for x==y do something >> like http://picpaste.com/SqB3JiID.png - definitely wrong. >> >> When setting countours to something like in region_plot: >> contours=[-1e307, 0, 1e307] - it gave expected result. Also setting it >> to something like [-eps, +eps], where eps was small enough (like >> smaller than line width) was ok. >> >> I think this is serious bug, at least for audience of my book (on >> Sage, aimed at highschoolers). This is function we used quite a bit in >> few chapters. Is this somewhere in Trac already? >> >> Regards, >> Andrzej. >> >> On Sat, Jan 16, 2016 at 10:05 PM, Francois Bissey >> wrote: >>> On 17/01/2016, at 09:57, kcrisman wrote: Does anyone knows why the default option for “contours” is set to “(0,0)” in implicit_plot (sage/plot/contour_plot.py line 571-572)? Instead of being left alone to “None”. I imagine that is what someone set it to long ago either in copying from something else or because it made things "look right" in some situation. If you try a wide variety of implicit plots with None and everything seems to be exactly the same, then this seems like a reasonable change. I don't know the history here, though (or I have forgotten it). >>> >>> Yes a long time ago. I have no idea if it will look the same but >>> matplotlib now says it is wrong to use it that way so it will have >>> to change one way or another. >>> Setting things to “None" make the dockets pass but I have no idea >>> of what it looks like. Won’t be able to really look at pictures until >>> Thursday. >>> >>> François >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "sage-devel" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to sage-devel+unsubscr...@googlegroups.com. >>> To post to this group, send email to sage-devel@googlegroups.com. >>> Visit this group at https://groups.google.com/group/sage-devel. >>> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-devel" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-devel+unsubscr...@googlegroups.com. >> To post to this group, send email to sage-devel@googlegroups.com. >> Visit this group at https://groups.google.com/group/sage-devel. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] default "contours" option for implicit_plot
Hi, Does anyone knows why the default option for “contours” is set to “(0,0)” in implicit_plot (sage/plot/contour_plot.py line 571-572)? Instead of being left alone to “None”. The value “(0,0)” causes a lot of doctest failures when moving from matplotlib 1.5 to 1.5.1 (not yet a ticket for that, spotted in sage-on-gentoo): File "/usr/lib64/python2.7/site-packages/sage/plot/graphics.py", line 2563, in sage.plot.graphics.Graphics.? Failed example: gm = g.matplotlib() # long time # without the patch, this goes BOOM -- er, TypeError Exception raised: Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 499, in _run self.compile_and_execute(example, compiler, test.globs) File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute exec(compiled, globs) File "", line 1, in gm = g.matplotlib() # long time # without the patch, this goes BOOM -- er, TypeError File "/usr/lib64/python2.7/site-packages/sage/plot/graphics.py", line 2635, in matplotlib g._render_on_subplot(subplot) File "/usr/lib64/python2.7/site-packages/sage/plot/contour_plot.py", line 195, in _render_on_subplot linewidths=linewidths, linestyles=linestyles, label=options['legend_label']) File "/usr/lib64/python2.7/site-packages/matplotlib/__init__.py", line 1812, in inner return func(ax, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/matplotlib/axes/_axes.py", line 5644, in contour return mcontour.QuadContourSet(self, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/matplotlib/contour.py", line 1424, in __init__ ContourSet.__init__(self, ax, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/matplotlib/contour.py", line 863, in __init__ self._process_args(*args, **kwargs) File "/usr/lib64/python2.7/site-packages/matplotlib/contour.py", line 1445, in _process_args x, y, z = self._contour_args(args, kwargs) File "/usr/lib64/python2.7/site-packages/matplotlib/contour.py", line 1540, in _contour_args self._contour_level_args(z, args) File "/usr/lib64/python2.7/site-packages/matplotlib/contour.py", line 1189, in _contour_level_args raise ValueError("Contour levels must be increasing") ValueError: Contour levels must be increasing Any time “implicit_plot” is called we get a failure because of this. François -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.