octave-maintainers
[Top][All Lists]
Advanced

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

Re: missing pdf terminal; was --> [changeset] print.m (matlab compatibil


From: Ben Abbott
Subject: Re: missing pdf terminal; was --> [changeset] print.m (matlab compatibility)
Date: Tue, 10 Mar 2009 19:19:08 +0800


On Mar 10, 2009, at 5:35 AM, John W. Eaton wrote:

| set (0, "defaultaxesfontsize", 12)
| set (0, "defaultetxtfontsize", 12)
| set (0, "defaultaxesfontname", "*")
| set (0, "defaultetxtfontname", "*")
| figure (1)
| clf
| surfl (peaks ())
| xlabel ("X")
| ylabel ("Y")
| zlabel ("Z")
| title ("surfl (peaks ())")
| set (gcf, "paperunits", "inches")
| set (gcf, "papersize", [6, 4.5])
| set (gcf, "papertype", "<custom>")
| set (gcf, "paperposition", [0, 0, 6, 4.5])
| print (gcf, "-deps", "test_surfl.eps")
| print (gcf, "-dpdf", "test_surfl.pdf")
| print (gcf, "-dpng", "test_surfl.png")
| print (gcf, "-dpng", "-r300", "test_surfl-300dpi.png")

When I try these commands, the pdf version fails because my gnuplot
(4.2.4, Debian testing) wasn't built with pdf support (why not?) and
then gnuplot spews a lot of "invalid character" messages.  Maybe we
need to detect whether a terminal is supported and then fail a bit
more gracefully.  But don't worry about fixing that in this changeset.


Some weeks ago I wrote a short function to obtain values for gnuplot's public variables.

... which can be used to obtain the version and patch-level

        ver = __gnuplot_get_var__ (gcf, "GPVAL_VERSION");
        level = __gnuplot_get_var__ (gcf, "GPVAL_PATCHLEVEL");

... the X11 window id

        window_id = __gnuplot_get_var__ (gcf, "GPVAL_TERM_WINDOWID");

... as well as the available gnuplot terminals

terms = regexp (__gnuplot_get_var__ (gcf, "GPVAL_TERMINALS"), "\\b\\w+ \\b", "match");

Shall I commit this function and add a check to gnuplot_drawnow to verify the terminal type is available in gnuplot just after the plot stream is opened?

Ben





reply via email to

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