Multiple plots: oddities (bugs?), missing features in Xmaxima and wxMaxima
Subject: Multiple plots: oddities (bugs?), missing features in Xmaxima and wxMaxima
From: Mario Rodriguez
Date: Sun, 18 Sep 2011 13:23:24 -0400
On 09/17/2011 07:48 AM, Virgil L wrote:
>
> To make a concrete question: can maxima infer -- in the context of
> draw2d of course -- that (sin(x),x,0,10) MUST mean
> explicit(sin(x),x,0,10) and (y^2=x^3+1,x,-4,-4,y,-4,4) MUST
> mean implicit(y^2=x^3+1,x,-4,-4,y,-4,4) ?
>
>
> If true then the declaration explicit/implicit could be _optional_,
> that is, allowed but not required.
>
> Of course, if a user wants to declare explicit/implicit for additional
> clarity, consistency, etc fine....s/he should still be able to do so.
> But if maxima can infer unambiguously what the user means it would
> seem helpful to allow maxima to do so. And even if maxima occasionally
> infers wrong, the user could THEN write the complete declaration
> (while not writing it the vast majority of the times).
>
Hello,
You are focusing your attention on the syntax for explicit/implicit, but
others have asked, for example, why are we using symbol = for the
options. Some people would prefer something like
xrange -> [0.1]
instead of
xrange = [0,1]
and others, perhaps inspired by the lisp syntax, would be more
comfortable with
[xrange, 0, 1]
or
[xrange, [0, 1]]
There were some discussions in this list on these topics in the past,
not only related to the plotting routines. What is the best decision? I
don't know; they all are reasonable, as well as your own opinions on the
syntax for explicit and implicit objects, which I really understand.
The draw package could understand all these variations, and many others,
by simply adding more and more conditionals, and let the user write
commands according to his own ideas. But I don't think this is the right
direction.
> The ideal solution would be for the draw2d interface to be
> "incremental" over the plot2d one.
>
This is an interesting point. In fact, this was one of the first ideas
before starting writing draw. By complex plots I do not only mean scenes
with many different objects, but also multiplots (that is, various plots
in the same window or file) and animations. The idea of multiple windows
came later, as a user requested feature. But the plot routines were not
designed with many-objects-scenes (and each one with its own fine-tuning
options), multiplots and animations in mind.
As a result, another internal logical structure was necessary. Of
course, I don't claim the actual structure of draw is optimal in any sense.
> As for a user writing own wrapper functions, yes, it is in principle
> possible, especially for an "advanced" user. It may however not be
> realistic for a relatively new user to do so. The new user has his
> hands full learning the entire system (not just plotting) and won't
> want to deviate into modifying a system that he is just starting to know.
>
You don't need to modify anything and you don't need to be an advanced
user. You can write something like the following code in an external
file or in a wxmaxima notebook (wn below is the window number):
load(draw) $
p(expr,x0,x1,wn) :=
draw2d(
explicit(expr,x,x0,x1),
terminal = [screen,wn] ) $
And then, while explaining something to your students in class,
p(x^2,0,1,0) $
p(x^3,0,1,1) $
This way, you can save time and avoid some typing. I find this very
useful and make use of it in many other contexts, not just plotting.
Writing functions in Maxima is very simple. I would say it's an
excellent language for learning basic programming skills: local
variables, conditionals, loops.
Try it, and if you need assistance, you'll get help in this mailing list
(at least 99% of the time).
> Furthermore, it would seem to be a waste of community resources for
> "N" users to each spent "M" hours of programming each developing his
> own wrapper functions or adaptations. It would seem that the
> philosophy of open source software would suggest a different approach.
>
I understand. I also have trouble finding time to write my own
functions. Not to mention those to be used by others.
> Best,
>
> Virgil
>
Again, thanks for your comments and interest.
--
Mario