> > Looking at MMA's plot commands, only this syntax is accepted:
>
> > Plot[Sin[x], {x, 0, Pi}]
>
> > Note the explicit variable name.
>
> > I think we should try to make the syntax uniform for all the plot
> > functions, and ask the user to specify the variable in every case.
> > (This means deprecating the xmin/xmax parameters of the plot function
> > as well.)
>
> Specifying a variable in every case doesn't work for us.  If f is a
> python function, or a "function" (in that it has a specified order of
> variables), it makes it so that we still need to support (-2,2) syntax.

Yes, it seems pointless to *remove* unambiguous simpler syntax options
in one variable like
sage: plot(sin(x),0,pi)
or even
sage: plot(sin,0,pi)
And
sage: plot(1,(y,-5,5))
sage: plot(1,-5,5)
actually seem quite reasonable plotting a horizontal line, which they
do; the variable happens to be y in the first case and (implicitly) x
in the second, but whatever; this information is internal to the
plot.  I assume that part 3) of Carl's proposal stands.

I do agree that xmin etc. as names make no sense in the long run,
though pretty much every nonobvious plot ever probably used them...
that might need a 1 year deprecation.  It also seems useful to me to
create a plot once, but then have the option of viewing it over many
different ranges, so that it isn't recomputed each time, though
whether that would be an option for plot or show I don't know.

Going back to Jason's point:

> Specifying a variable in every case doesn't work for us.  If f is a
> python function, or a "function" (in that it has a specified order of
> variables), it makes it so that we still need to support (-2,2) syntax.

Can one make a similar argument about integration - that if one has an
expression with only one reasonable variable choice, it could be
integrated etc?   E.g.
sage: integrate(x^2)
x^3/3
sage: integrate(x^2,0,1)
1/3
would still work?  (I guess that would involve turning it into a
function internally if it were a symbolic expression?)  Again,
removing this sort of unambiguous (and easy/intuitive) thing seems
unreasonable to me.  We would be making Sage harder to use for entry-
level users for no particular reason other than pedantry.

If these things stuck around, I guess I could live with f=x^2 yielding
an error upon f(3), though the commonsense idea to me is that if
someone attempted
sage: f=x^2
sage: f(3)
9
sage: f
x |--> x^2
would occur, so that again in an unambiguous one-variable setting a
symbolic expression f would be changed into a one-variable function,
maybe even with a warning message printed out so that foolish freshmen
would never confuse elements of symbolic rings with functions again!
Would such an idea have any traction at all?  It doesn't sound
particularly hard to check for.

Incidentally, I have to say that it's weird to be put in the position
of being on the overly pragmatic side of things in this discussion;
that almost never happens to me.

- kcrisman
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to