help-octave
[Top][All Lists]
Advanced

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

Re: print ignores object properties in 3d


From: Ben Abbott
Subject: Re: print ignores object properties in 3d
Date: Thu, 13 Nov 2008 21:41:07 -0500

Hi David,

I understand what you're seeing now.

I'm running gnuplot 4.3 and have no problem printing to a pdf file. I thought I had printed to pdf files when I was using 4.2.3 ... can someone else comment?

Regarding the zlabel for 3D plots, it appears that octave is not setting the zlabel rotation to the default 90 degrees. Unfortunately, even when I fix that gnuplot ignores it.

What I can offer you today is a work around. Rather than using zlabel("your zlabel"), try

hz = text(1.15*min (get (gca, "xlim")), 1.15*max (get (gca, "ylim")), mean (get (gca, "zlim")), "my rotated zlabel");
        set (hz, "rotation", 90, "horizontalalignment", "center")

If you want to adjust the font size

        set (hz, "fontsize", 12)

Setting the (x,y) position correctly can be a pain if the perspective changes.

To fix this correctly, I think gnuplot should be patched so that 3D plots respect the specified axis label rotations.

Ben



On Nov 13, 2008, at 12:46 PM, David Donovan wrote:

Hi Ben,

Thanks for the response.

First of all, my gnuplot is:

octave-3.0.2:1> system("gnuplot --version")
gnuplot 4.2 patchlevel 3
ans = 0


Secondly, I am having difficulty producing pdf's at all.... I get this:

-- BEGIN OUTPUT --
octave-3.0.2:2> sombrero;
octave-3.0.2:3> print -dpdf sombrero.pdf

gnuplot> set terminal pdf color enhanced;
                     ^
        line 0: unknown or ambiguous terminal type; type just 'set
terminal' for a list


gnuplot> splot "-" using ($1):($2):($3):($4) title "" with pm3d linestyle 1 ;
              ^
        line 0: use 'set term' to set terminal type first


gnuplot> -8 -8 -0.083953080486421 -0.083953080486421
        ^
        line 0: invalid command

-- END --

Thirdly, my original question is that the default outer position (the
plot limits within the drawing surface) are not large enough to
contain a longish z-axis label in 3d plots.  For example:

octave-3.0.2:5> sombrero;
octave-3.0.2:6> zlabel("This is my z-label")
octave-3.0.2:7> set(gca(), "outerposition", [0.1,0.1,0.9,.9])

Will plot (on screen) the sombrero with enough space to see the z-axis
label.  Now, if I print this to a file (postscript since my pdf isn't
working):

octave-3.0.2:6> print -deps sombrero.eps

I get the attached plot, which has ignored my set(gca() ....) command
and goes back to some other outerposition which is not large enough to
show my z-axis label.

Thanks for any help you might provide on these problems.

Cheers,
David Donovan




On Wed, Nov 12, 2008 at 4:44 PM, Ben Abbott <address@hidden> wrote:

On Nov 12, 2008, at 2:19 PM, David Donovan wrote:

Hi All,

I have what I believe to be a small problem that I hope someone can
help me with.

I'm trying to plot a 3d surface using Octave octave-3.0.2 for Mac OS X
(Octave.app), and my z-axis labels are getting cut off when I try to
print to a file.

I am able to make them look okay in the gnuplot display window by using

set(gca(), "defaultaxesouterposition", [0.1,0.1,0.9,0.9])

However, print -deps "foo.eps" , simply ignores this option and plots
it in the default manner.

Do hardcopy devices have some other hidden axis properties somewhere?
Am I missing something here?

Forgive me if this comes up regularly, but my due diligence of
searching the mailing list didn't turn anything up.

Cheers,
David Donovan


I'm on Mac OSX as well and have been working on incorporating more of the figure/axes properties into the gnuplot backend. Can you provide a simple
example of the problem?

Something like the following

sombrero;
print -dpdf sombrero.pdf

I'm able to run 3.03 and the developers sources. Each produce the correct
result.  Perhaps you are using a different -dDevice?

For reference please tell us what version of gnuplot you have installed

system ("gnuplot --version")

From the Octave prompt, I get "gnuplot 4.3 patchlevel 0"

Ben




Ben




<sombrero.eps>



reply via email to

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