printing figures with development version

Ivan Sutoris ivan.sutoris at gmail.com
Thu Apr 2 13:30:27 CDT 2009


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


More information about the Octave-maintainers mailing list