William Stein wrote: > On Sat, Mar 14, 2009 at 11:37 AM, Burcin Erocal <bur...@erocal.org> wrote: >> On Sat, 14 Mar 2009 13:18:40 -0500 >> Jason Grout <jason-s...@creativetrax.com> wrote: >> >>> William Stein wrote: >>>> On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout >>>> <jason-s...@creativetrax.com> wrote: >>>>> William Stein wrote: >>>>>> On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty >>>>>> <carl.wi...@gmail.com> wrote: >>>>>>> 2) plotting >>>>>>> A lot of the plotting code is willing to pick variable names (in >>>>>>> alphabetical order) if names aren't given in the plot ranges. >>>>>>> For instance, this is a doctest in plot.py: >>>>>>> sage: f = sin(x^2 + y^2)*cos(x)*sin(y) >>>>>>> sage: c = contour_plot(f, (-4, 4), (-4, 4), plot_points=100) >>>>>>> This will be deprecated, but any of the following will work: >>>>>> -1 >>>>>> >>>>>> I'm strongly against deprecating anything like this for plotting, >>>>>> since there are clear labeled axes in the plot. >>>>>> >>>>>>> sage: c = contour_plot(f, (x, -4, 4), (y, -4, 4), >>>>>>> plot_points=100) sage: c = contour_plot(f.function(x, y), (-4, >>>>>>> 4), (-4, 4), plot_points=100) sage: c = contour_plot(lambda x,y: >>>>>>> f(x=x,y=y), (-4, 4), (-4, 4), plot_points=100) >>>>>>> >>>>> I'm just as strongly for the deprecation. The axes are *not* >>>>> clearly labeled: it's not clear which axis is which because there >>>>> are no variable names next to the axes. Even if we fixed that >>>>> issue, though, it is not clear to the user how to switch the axes >>>>> if they are opposite from what they want. contour_plot(f, >>>>> (x,-4,4), (y,-4,4)) makes it intuitive that if you want to swap >>>>> roles of the axes, you swap the ranges. Explicit is better than >>>>> implicit, I feel, in this case. >>>>> >>>> Well then we disagree. There is a very standard convention in math >>>> to have the x axis in one spot, then the y-axis. >>> What happens when you have variables u and v? Or a and b? Or t and >>> s (oops, I mean s and t; I forgot the alphabetical order; see? it's >>> easy to mess up; but t is often the x-axis, regardless of what the >>> other variable is called, even if it is alphabetically >>> smaller... :). What about variables some_long_name and >>> some_long_mame? It's much harder then to figure out which gets >>> magically picked as the x-axis. >> I agree with Jason here. I think the variables should be specified >> explicitly. >> >> William, shall we treat the case where the only variables in the >> expression is x and y specially, and allow not specifying the variables >> for the axis then? I think this makes the notation confusing and >> inconsistent. >> > > I have never ever even once heard of somebody complaining or being > serious confused because these pop up a plot: > > sage: > sage: plot(sin(u), (-3,3)) > sage: plot3d(x^2 + y^2, (0,3), (-2,3)) > > I have frequently seen and heard of people being confused by > > sage: x(5) > 5 > > > Just for historical perspective, when plot was written there was no > symbolic ring in sage and no symbolic variables, so putting (x,0,3) > made no sense...
That makes sense, given the history. We have them now, so we can be better about that sort of thing. From #sage-devel IRC: [13:48] <wstein2> I would now consider proposing that now that we have symbolics we try to renormalize things to be very similar to mathematica again. [13:48] <jason--> I agree. [snip..] [13:48] <wstein2> If you propose it on sage-devel, i'll write back and agree, conceeding my point. To be clear, I think we are agreeing that Carl Witty's proposal point (2) is okay. Thanks, Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---