On 09/20/2011 04:12 PM, Mixon, Wilson wrote:
> Does draw have a counterpart to plot's plot_real_part? The default for plot_real_part is false, so that plot does not plot the real part of complex numbers. On the other hand, draw does plot them and does so without any warning (as far as I can determine).
>
> Thanks.
Hello,
This was fixed some days ago.
You can download 'draw.lisp' and 'grcommon.lisp' from the repository
(maxima/share/draw) and copy them into your local system.
http://maxima.git.sourceforge.net/git/gitweb-index.cgi
In short, I have added a new option named draw_realpart (true by
default). These examples should work:
f(x) := sqrt(x2 - 4*x) - x;
draw2d(
xaxis = true, yaxis = true,
draw_realpart = false,
explicit(f(x), x, -1, 5),
color = red,
draw_realpart = true,
explicit(f(x)+1,x,-1,5),
color = black,
draw_realpart = false,
explicit(f(x)+2,x,-1,5) );
And:
set_draw_defaults(draw_realpart = false);
draw2d(
xaxis = true, yaxis = true,
explicit(f(x), x, -1, 5),
color = red,
explicit(f(x)+1,x,-1,5),
color = black,
explicit(f(x)+2,x,-1,5) );
Take into account that this option only works with explicit 2D objects.
I'll try to extend the effects to other 2D and 3D objects.
Good luck.
--
Mario