On 3/30/08, Thomas Widlar <twidlar at yahoo.com> wrote:
> If you define a variable or function to be
> plotted which contains a nonnumeric parameter
> in addition to the x variable for example,
> then Maxima hangs. For example:
>
> F: a*3*x;
> plot2d([F], [x,-5,5], [nticks,100])$
Maxima isn't exactly stuck or crashed, but it is trying very hard
to find some points to plot; it will try something like
nticks * 2^(adapt_depth + 1) points before giving up.
(The default value of adapt_depth is 10.)
Probably the default value of adapt_depth should be more like 4 or 5.
If nobody objects, I will change adapt_depth. I'm pretty sure this
problem has caused trouble before.
Also, probably the plotting algorithm should be changed so that it
gives up sooner if there are no points to plot.
That's more work, I don't think I'll do that right now.
Finally, plot2d should give some kind of intelligible error message
if there are no points; at present Gnuplot eventually complains
about an empty plot file or something like that.
> A second unpleasant feature is that nticks is
> predefined to 0 by the plot menu. If one leaves
> this as is, it gives division by zero.
Hmm. This sounds like a wxMaxima bug; Maxima proper doesn't
have a plot menu, and the default value of nticks is 10.
You might consider using the draw package which has a function
draw2d which might have fewer idiosyncrasies than plot2d,
or different ones at least.
best
Robert Dodier