On Sun, 2007-02-25 at 10:50 +0100, Mario Rodriguez wrote:
> > I have also tried x/(x^2-100): the picture displayed is in the x
> range
> > [-5,5] and in the y range [-0.06,0.06].
> > --> Note that asimptotes (at +-10) are NOT shown. So that it appears
> Mupad
> > has gone for a not so smart solution.
> > I guess the Mupad 'marketing office' maintains that feature is
> appreciated
> > by users, as a starting point, if they did not care to set the
> range.
>
> Gnuplot has also a default xrange, namely [-10:10], so that you can
> write in a fresh session:
>
> plot sin(x)
>
> or
>
> plot sin(0.1*x)
>
> In both cases, you'll get plots in the [-10:10] domain.
>
> Honestly, I prefere to set myself the xrange, which is plot2d and
> draw2d
> policy.
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.
Regards,
Jaime