print.m
Ben Abbott
bpabbott at mac.com
Wed Apr 29 14:25:54 CDT 2009
On Wednesday, April 29, 2009, at 12:19PM, "Michael D. Godfrey" <godfrey at isl.stanford.edu> wrote:
>Ben,
>
>I tried test_print.m again this morning on 2 machines. The
>"syntax error" messages are gone. So, this problem is like
>what we have seen in the past. Errors in the communication with
>gnuplot, typically what appear to be dropped leading characters,
>just come and go. Last night I ran test_print about 4 or 5 times
>and always got the errors. Today they are gone.
>
>About the font errors: the message does not show what font cannot be
>found, so it is hard to decide what to do about it.
>
>Michael
>
Michael,
Regarding the font errors, it is possible that the problem is related to the default font setting. The present default fontname is "*". The gnuplot backend translates this to ",12" for a 12 point font (i.e. the fontname is empty). This it is possible that the reason no fontname is part of the error message is because the specified fontname is a null string.
Try ...
set (0, "defaultaxesfontname", "Helvetica")
set (0, "defaultextfontname", "Helvetica")
You might try "Arial" as well. For me these font's do not exist for all of gnuplot's termials, so both give errors.
Regarding the timing errors, when you encounter them again, try editing __gnuplot_open_stream__.m and add "pause(0)" between lines 39 and 40 (see below). I'd encountered a similar problem in the past and this worked for me. If it works for you, we can discuss adding this (kludgy) fix to the sources.
25 function plot_stream = __gnuplot_open_stream__ (npipes, h)
26 cmd = gnuplot_binary ();
27 if (npipes > 1)
28 [plot_stream(1), plot_stream(2), pid] = popen2 (cmd);
29 if (pid < 0)
30 error ("__gnuplot_open_stream__: failed to open connection to gnuplot.");
31 endif
32 else
33 plot_stream = popen (cmd, "w");
34 if (plot_stream < 0)
35 error ("__gnuplot_open_stream__: failed to open connection to gnuplot.");
36 endif
37 endif
38 if (nargin > 1)
39 set (h, "__plot_stream__", plot_stream);
pause(0)
40 endif
41 endfunction
Ben
More information about the Bug-octave
mailing list