Hi!
I've committed a patch which slightly changes Maxima
gnuplot behavior. Modifications are essentially the
ones introduces recently by Volked on windows
but propagated to all platforms.
Instead of describing what have been changed I'd
like to summarize current Maxima gnuplot behavior.
At present there is four plotting modes:
1. [gnuplot_term,default]
This is default mode - plot is displayed in some window.
Some graphical environment is required.
2. [gnuplot_term,dumb]
This is pure text ASCII-art plot and may be useful if
no graphical environment is available.
Now this kind of plot is handled via temporary
file - (a) plot is saved into file either
specified by user (gnuplot_out_file) or maxplot.dumb,
(b) this file is displayed using $printfile
functions. The advantage of this approach is that
it platform independent and should work for all
Maxima GUI.
3. [gnuplot_term,ps]
No previews. PostSctipt is saved to gnulot_out_file
or to maxplot.ps if gnuplot_out_file is not set.
4. gnuplot supports dozens of other output formats.
For all these formats the following construction can
be used:
[gnuplot_term,default]
[gnuplot_preamble,"set term png,set out 'my.png'"]
Now Maxima checks for 'set out ' in gnuplot_preamble
and doesn't lock resulting file on Windows.
I have some idea how to modify option 4 above
but I'm not sure is it good or not since it doesn't
add any new functionality but INHO just tiny bit of
convenience by making Maxima plotting more uniform.
At plesent Maxima plot command complains if gnuplot_term
is not one of the three - default, ps, dumb.
Let's remove this restriction and if gnuplot_term
is not default, ps or dumb pass its value directly
to "set term " (gnuplot_term may be ether atom or string).
So the following constructions will work
[gnuplot_term,png], [gnuplot_out_file,"my.png"]
or even
[gnuplot_term,"png size 1000,1000"], [gnuplot_out_file,"my.png"]
The only downside of this is that we cannot check
that "png size 1000,1000" is really valid gnuplot terminal.
On the other hand we cannot do this for gnuplot_preamble
as well.
Best wishes,
Vadim
--
Vadim V. Zhytnikov
<vvzhy at mail.ru>
<vvzhy at netorn.ru>