only defined points plotting



> So I'm trying to propose the use of free software for teaching and I'm
> trying to answer at questions like: "...but that commercial sw do it
> correctly...". Trying not to discuss what is really correct in this
> field, is there any easy way to force maxima to emit only results for
> imaginary part=0?
>
> I assume that the easy answer is simply: "no".

Since there is no way to force plot2d to plot the way you want maybe
you can change the function to return values only when they are real:

(%i1) my_sqrt(x) := if x>=0 then sqrt(x);
(%o1) my_sqrt(x):=if x>=0 then sqrt(x)
(%i2) plot2d(['(my_sqrt(x^2-3))], [x,-5,5], [y,-4,4], [gnuplot_preamble, "set
xrange [-5:5]; set yrange [-4:4];"])$

Now the graph is disconnected.

Adding another option variable which would make plot2d to plot a
function only where the value is real would be trivial. Maybe we
should consider it?

Andrej