--- Raymond Toy wrote:
>
> My fix was just a fix for an issue. I didn't try to design anything,
> and I think that's what we really want to do. What is the
> appropriate interface? Is that what we want? Will users want that?
> What happens if some other plotting system gets used? What happens
> if the user says do a log plot, but puts a gnuplot option of no log
> plot?
I think the rule there should be the gnuplot option overrides the user
option, perhaps with a warning if that is practical.
> These are the kinds of things I was ignoring by just focusing on
> enabling the user to tell maxima to do log sampling.
>
> If someone wants to design the interface, I can help implement it.
Ho, boy. Well, I have a few thoughts but I don't know if they're worth
much, and I'll save Robert the trouble of telling me they're overkill
by admitting it up front ;-). It goes a little beyond the sampling
issue, so perhaps it should be labeled "off topic."
Broadly, I would like to see the plotting system operate at two levels.
One would be a plotting system that doesn't worry about the details of
the abilities of the various programs, but simply defines all the
abilities we want in the ideal, general case. The theoretical output
mode would be the "ideal" Maxima plotting program. At this level it's
not so much of a concern whether any of the programs are up to what we
want (say, for example, having the view_direction variable updated as
the user moves the plot around interactively - say, perhaps, whenever
the mouse is released after dragging. No plotting program we interface
to is up to this, that I know of, but it is a desirable feature so we
can design it in and activate it when a plotter supports it.)
Level two would be converting the plotting features into outputs for
the various programs we can plot with. In other words, for each
feature there are either a) routines telling Maxima how to do X in
plotter Y, or b) there is either an explicit statement or an implicit
assumption that a given capability is not supported by an interface.
(defprop might be of use here - I don't understand it well enough to
know yet.) If the user tries to invoke an option that isn't supported,
return an error telling them either "FEATURENAME is not supported in
PLOTTER" or "FEATURENAME is only supported in
WORKING_PLOTTERS_FOR_FEATURE."
We can keep the PLOTTER_OPTIONS variables, and there the user can put
in things like we put in the gnuplot preamble variable, options we
don't know about in Maxima proper. Hopefully, though, this can be kept
to a minimum - I would like to define the ploting logic in Maxima
itself very broadly, and plug the plotters into this logic wherever
they support it. Perhaps we could have plotting-gnuplot,
plotting-geomview, etc. packages that would be used and unused
depending on how the variable controlling which plotter was used was
set, which contain the plotter specific information.
The inter-relatedness of features would have to be addressed thoroughly
over a rather long process, I'm afraid - for example if xsample:log is
set and a plotter doesn't have the ability to do log formatting, should
an error be signaled? xsample is just where Maxima takes it's points
from when preparing the data for the plotter, so in theory it's
independant of the xaxis display in the plotter, but the results would
be a bit startling. Perhaps a warning rather than failure is in order
here though, because while it is a situation to frustrate a beginner an
advanced user might WANT such a plot. So we would both want to inform
a beginner that this won't do what they might expect, and allow a
seasoned user to proceed. There are probably many other such cases.
I know there were some recent improvements made, so I don't know quite
where things stand now, but here are some other thoughts:
I would like plot2d to accept things of the form [[x1,y1],[x2,y2],etc]
and plot3d to accept [[x1,y1,z1],[x2,y2,z2],etc], and accept various
options for plotting of points. (dot size, style, etc.)
It would be really cool to be able to show things like holes
intelligently on a plot, but I don't think any of our current options
are up to it even if Maxima could figure out where the holes are.
Have sampling be controlled by a variable, which could be set to
linear, log, and perhaps other fancier things.
Doubtless there are many other points, some of them immediate and
practical.
FWIW,
CY
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs