> I also prefer to give the domain myself, but I think that we should
> allow users to omit the domain if they want to, in which case a
> default domain would be used.
>
> It is not very difficult to do that change in Maxima, since the
> graphic packages already have that feature: as you mentioned,
> gnuplot has a default xrange. Openmath also has predefined xrange
> and yrange. For instance, put the following into a file (plot.txt
> for instance):
>
> plot2d -xfun "x/(x^2-4)"
>
> and then execute the command:
>
> xmaxima plot.txt
>
> to see the graph produced by Openmath (the y range should be the
> default from -10 to 10; it is not due to a bug).
>
> In plotdf I decided to accept default values for xrange and yrange
> if they are not given. I think that a future version of plot2d
> (which would be just a wrapper for Mario's draw2d and an
> improved graph2d) should also use default values if no ranges are
> given.
>
Ok, I'll put this in my 'draw-todo' list.
In the meantime, the user can define a function similar to
(%i1) p(f):=plot2d(f,[x,-10,10],
[gnuplot_preamble,"set yrange [-10:10]"])$
(%i2) p(1/(x^2-4))$
--
Mario Rodriguez Riotorto
www.biomates.net