print.m
Ben Abbott
bpabbott at mac.com
Thu Apr 30 18:11:12 CDT 2009
On Apr 29, 2009, at 10:04 PM, Michael D. Godfrey wrote:
>> Running with the gnuplot terminal set to wxt (export GNUTERM=wxt),
> I get:
> octave:1> test_print
> line 0: undefined variable: size
>
> gdImageStringFT: Could not find/open font while printing string
> figure size is 8x6 inches with font
> gdImageStringFT: Could not find/open font while printing string 2
> with font
> gdImageStringFT: Could not find/open font while printing string
> figure size is 8x6 inches with font
> gdImageStringFT: Could not find/open font while printing string 2
> with font
> gdImageStringFT: Could not find/open font while printing string
> figure size is 8x6 inches with font
> gdImageStringFT: Could not find/open font while printing string 2
> with font
> gdImageStringFT: Could not find/open font while printing string
> figure size is 8x6 inches with font
> gdImageStringFT: Could not find/open font while printing string 2
> with font
> gdImageStringFT: Could not find/open font while printing string
> figure size is 8x6 inches with font
> gdImageStringFT: Could not find/open font while printing string 2
> with font
> gdImageStringFT: Could not find/open font while printing string
> figure size is 8x6 inches with font
> gdImageStringFT: Could not find/open font while printing string 2
> with font
> gdImageStringFT: Could not find/open font while printing string
> figure size is 8x6 inches with font
> gdImageStringFT: Could not find/open font while printing string 2
> with font
> gdImageStringFT: Could not find/open font while printing string
> figure size is 8x6 inches with font
> gdImageStringFT: Could not find/open font while printing string 2
> with font
> ============================================================
>
> There are quite a lot of differences between X11 on Mac and on the
> various Linux systems.
> Most are converging on xorg, but by differing paths and, of course,
> with differing sets of fonts.
>
> Why the use of "paperposition" makes a difference to fonts is a
> mystery to me. It would be
> good to track that down.
>
> Michael
I've tracked done all the problems we've seen on this thread (sort of).
There are three errors.
(1) The plotting to the screen with gnuplot < 4.3 the error below
occurs for wxt, but not x11 or aqua. For gnuplot 4.2.5, x11 also
produces this error message.
line 0: undefined variable: size
This error is related to the "set term wxt ..." command.
set terminal wxt enhanced title "Figure 1" size 560,420
The wxt terminal should be treated the same as the x11 terminal in
gnuplot_drawnow. This is easily corrected with a patch (I've just
pushed a changeset fixing this). Additionally, the capability to set
the position/size of the figure window is not part of 4.2.5, so the
version number associated with this feature needed to be changed in
__gnuplot_has_feature__.m.
(2) The error below occurs for x11 (not for wxt or aqua) with gnuplot
> 4.2.3. It coincides with the presence of a superscript. For
example; 'title ("Super^{Script}")'
setting font to ,12
If I change from the default anonymous fontname to "Arial"
set (0, "defaulttextfontname", "Arial")
set (0, "defaultaxesfontname", "Arial")
Then I get
setting font to Arial,12
Running 3.0.5, I see the same effect.
octave:1> x = 0:0.01:5;
octave:2> plot(x,sin(x),x,cos(x))
octave:3> xlabel('x-axis')
octave:4> ylabel('amplitude')
octave:5> title("Super^{Script}")
octave:6> setting font to Helvetica,10
setting font to Helvetica,10
Thus, I assume this (gnuplot) problem is unrelated to recent
changes ... and I don't know how to fix it.
(3) The error below occurs for x11, wxt, and aqua with gnuplot =
4.2.3. It coincides with the presence of a superscript. For example;
'title ("Super^{Script}")'. I notice the x11 font used for the title
is different when there is a superscript. Also, this error is
suppressed when the paperposition is changed to 3x2 inches, but only
because the title is not visible (is it not rendered).
gdImageStringFT: Could not find/open font while printing string figure
size is 8x6 inches with font
gdImageStringFT: Could not find/open font while printing string 2 with
font
When I change my default fontname, these errors go away. Changing the
default means using a specific font. As before, "Arial" works for me.
set (0, "defaulttextfontname", "Arial")
set (0, "defaultaxesfontname", "Arial")
Michael, please comment if my understanding isn't consistent with your
experience.
Ben
More information about the Bug-octave
mailing list