help-octave
[Top][All Lists]
Advanced

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

Re: printing plots in 3.2.2


From: Ben Abbott
Subject: Re: printing plots in 3.2.2
Date: Mon, 03 Aug 2009 19:59:40 -0400


On Aug 3, 2009, at 1:33 AM, Dmitri A. Sergatskov wrote:

I did the following on self-compiled octave-3.2.2 on Fedora-11 x86_64:

octave:1> plot(randn(10))
        line 0: undefined variable: size

octave:2> xlabel("X")
octave:3> ylabel("Y")
octave:4> title("Test")
octave:5> print("-depsc2", "test_epsc2.eps")
octave:6> print("-dpsc2", "test_psc2.ps")
octave:7> print("-dpng", "test_png.png")

===

The observations:

* "line 0: undefined variable: size" (does not show up on the
subsequent plots!),
appears to be benign

* fonts on x11 terminal looks too small for my taste (smaller than used
 to be with 3.0.x)

* eps file has really, really small fonts

* ps fonts look OK, but entire figure shifted too much to the left
 "Y" label essentially cut off of the page

* png file looks great

This is all with a fairly recent cvs snapshot of gnuplot.

FWIW.

Dmitri.

The "line 0: undefined variable: size" error is from gnuplot. It appears that this is due to a bug in the pipe to gnuplot. Unfortunately, I don't get the error so I'm unable to try to track it down.

The x11 fonts may be modified by specifying a default font.

        set (0, "defaultaxesfontname", "Helveitica")
        set (0, "defaulttextfontname", "Helvetica")

or by changing the default fontsize

        set (0, "defaultaxesfontsize", 12)
        set (0, "defaulttextfontsize", 12)

In any event, in 3.0.x the default fontname was "Helvetica" for 3.2 is it "*". Which implies that x11 will use its default.

Gnuplot scales down the fontsize for eps files. You can compensate by increasing the fontsize. For example,

        set (findall (gcf, "-property", "fontsize"), 20)

The ps output is likely a problem because you're figure papersize/ paperposition properties are set to the size for a US letter (8.5x11in). If you change these to A4, you should get what you expect. As we don't yet have listeners in place for conversion of units, be sure to set those properties with units == "inches".

Ben



reply via email to

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