[Top][All Lists]

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

Problem with truncated axis label on eps plot

From: Moreno Marzolla
Subject: Problem with truncated axis label on eps plot
Date: Sat, 13 Feb 2010 16:49:53 +0100
User-agent: Thunderbird (X11/20090817)

Hello everybody,

I'm having troubles plotting to an eps file. I'm using GNU octave 3.2.3 and gnuplot 4.4 patchlevel 0-rc1, under Ubuntu 8.10 (amd64).
Consider the following script:

mydata = [1:20];

hold on;
papersize=[4 3]*0.8; margin=[0 0];
set(gcf,"paperposition", [margin papersize-margin*2]);

legend("True Value", "location", "northwest");

plot(1:20, [1.5*mydata; 0.5*mydata], "-", "linewidth",2);
legend("Bound one", "location", "northwest");

plot(1:20, [2*mydata; 0.4*mydata], "-+", "linewidth",2);
legend("Bound two", "location", "northwest");

xlabel("Some X Label");
ylabel("Some Y Label");
print("test.eps","-deps","-mono","-debug" );

The resulting plot is here:

As can be seen, the X axis label is truncated; tweaking the 'margin' variable in the code above does not help (positive values for margin(2) result in the label disappearing completely; negative values fix the problem but the whole figure, including the plot area, gets vertically enlarged). I checked the octave-print-commands.log file: it contains, among others, the following lines:

set tmargin screen 0.922106481481481;
set bmargin screen 0.104212962962963;
set lmargin screen 0.125659722222222;
set rmargin screen 0.902829861111111;

If I comment the lines above and run gnuplot on octave-print-commands.log, the result is fine, as can be seen here: Is there anything I can do in my octave script to fix the margins?

Additionally, I have been unable to plot multiple curves with the same line style. Is there the possibility to have, for example, both lines for "Bound one" with the same line style?

Thanks in advance for any hint,


Moreno Marzolla
EMail: address@hidden
WWW  :

reply via email to

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