octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnuplot output from print?


From: Søren Hauberg
Subject: Re: gnuplot output from print?
Date: Thu, 06 Sep 2007 22:48:18 +0200
User-agent: Thunderbird 1.5.0.13 (X11/20070824)

John W. Eaton skrev:
Since I find that I often need to see precisely what commands Octave
is sending to gnuplot (see the bug report from today about line colors
vs the -mono option for the print command) I made the following
changes.  Now if you use the option -debug=FILE with the print
command, Octave will also write all the commands it sends to gnuplot
to the file FILE (with just -debug, it writes to the file
octave-print-commands.log).
This is great! A couple of comments though:

1) A semi-colon is missing in 'print'. Patch attached.

2) I think it's a shame that this is reduced to a debug feature. Octave will never support every little weird feature of gnuplot, so it can be very handy to be able to tweak a plot in gnuplot. This feature can provide you with a rough gnuplot file that you can work from, when doing this tweaking. I think it would be more nice to have a 'print -dgnuplot' style syntax for this feature. But this an extremely small issue.

3) I can't figure out how to use it :-)

  >> plot(sin(linspace(0, 2*pi, 100)))
  >> print -debug=TEST.gp
  lpr: Error - no default destination available.

After this I have a file called '=TEST.gp'. So, to avoid having a file with '=' in the filename, I tried removing it

  >> print -debug TEST.gp
  convert: unable to open module file
  `/usr/lib/ImageMagick-6.2.4/modules-Q16/coders/gp.la': No such file or
  directory.

After this, TEST.gp seems to contain postscript data.

  >> print -debug TEST.gnuplot
  convert: unable to open module file
  `/usr/lib/ImageMagick-6.2.4/modules-Q16/coders/gnuplot.la': No such
  file or directory.

Could you show me a simple example of how to use the feature?

Thanks,
Søren
Index: scripts/plot/print.m
===================================================================
RCS file: /cvs/octave/scripts/plot/print.m,v
retrieving revision 1.21
diff -r1.21 print.m
123c123
<   debug_file = "octave-print-commands.log"
---
>   debug_file = "octave-print-commands.log";

reply via email to

[Prev in Thread] Current Thread [Next in Thread]