Is possible to call gnuplot script directly from maxima and let maxima only output necessary data in a file to be read by gnuplot?



Hi,
for plot2d/plot3d I can think of a few of simple things you may try:

1. Get the file gnuplot_def.lisp from the repository 
(https://sourceforge.net/p/maxima/code/ci/master/tree/src/gnuplot_def.lisp) 
and modify the function gnuplot-print-header. For instance, after the 
line at the end that says:

(format dest "set datafile missing ~s~%" *missing-data-indicator*)

add other lines such as:
(format dest "set the command I really need ~%")
that will override any other previous settings and will be written just 
before the data follows. Load
your modified version fo gnuplot_def.lisp with
load ("gnuplot_def.lisp")
and the next plot2d, plot3d, contour_plot or implicit_plot will use your 
customized header. If you make any improvements to gnuplot_def.lisp that 
you would like to share, please sent it to us.

2. See if [format,mgnuplot] works in your system. I've trying to recover 
that format, and it might work in some systems and not in others (for 
instance in recent windows versions the Starkit required has not been 
built). If that works, it will give you a chance to modify the preamble 
and replot.

3. Look for the files maxout.gnuplot or maxout.gnuplot_pipes that Maxima 
writes in your home directory. You may edit them and run "gnuplot -p 
maxout.gnuplot". If you only see maxout.gnuplot_pipes, try adding the
[plot_format, gnuplot] option.

I hope any of this helps. Regards,
Jaime

On 05-12-2013 22:16, - wrote:
> Dear all,
>
> I frequently find that I request features that are supported by 
> gnuplot but not by the maxima graphical interface (both plot2d/draw2d).
>
> For example, I need to draw broken axes. Here is how it is done in 
> gnuplot: 
> http://gnuplot-tricks.blogspot.co.uk/2010/06/broken-axis-once-more.html. 
> However, I did not find any way to draw broken axes using either 
> plot2d nor draw2d. (Is there a way?)
>
> Because all my data is processed and stored in Maxima. I am wondering 
> if it is possible to feed my data in maxima directly to a manually 
> written gnuplot script:
>
> 1. Let maxima output the data required for drawing to a temp file,
> 2. And then call a gnuplot script written by myself within maxima to 
> process these data.
>
> This is similar to what draw2d is doing. The difference is that I want 
> to write my own gnuplot script directly instead of depending on the 
> translation of draw2d or plot2d.
>
> I know *gnuplot_preamble *and*user_preamble*allow user to write raw 
> gnuplot code. However, they do not allow you to modify the line with 
> the final plot command in gnuplot and I can not write multiple plot 
> commands either. This prevent me from implementing many required 
> features, for example broken axes.
>
>