octave-maintainers
[Top][All Lists]
Advanced

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

Re: printing figures with development version


From: Ivan Sutoris
Subject: Re: printing figures with development version
Date: Thu, 2 Apr 2009 20:30:27 +0200

Hi

I've stumbled upon another problem with exporting figures in
development version. Sometimes, after setting 'papersize' and
'paperposition' property, axes labels are cut off from the figure:

% open new figure
h = figure;

% figure size in cm, convert to inches
figsize = [8 6];
figsize = figsize * 0.39370;

% set paper size and figure position
set (h, 'papertype', '<custom>')
set (h, 'paperunits', 'inches');
set (h, 'papersize', figsize)
set (h, 'paperposition', [0, 0, figsize])

% plot
plot(rand(50,1))
xlabel('t')
ylabel('X_t')

% print to eps
print myfig.eps -depsc

Here both axes labels are half-cut from final eps figure. It is
possible to adjust "position" property of axes object to have more
space at margins, however that's rather cumbersome (adjustment must be
done manually for each figure).

I think (if I've understood documentation on Mathworks site correctly)
that in Matlab this is solved by computing "tightinset" read-only
property of axes, so that position + tightinset is area that includes
axes with all associated text objects (and so position can be adjusted
appropriately). Tightinset is available in Octave but returns zero
vector, so it's probably not fully implemented. Is there some other
way?

Regards
Ivan Sutoris


reply via email to

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