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. Burcin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---