Reputation: 1304
I would like to save the figure plot in in FULL SCREEN.
My code save the figure in tiff file but not in full screen; with overlapping txt titles. please, any one does know how to solve this issue ?
scrsz = get(0,'ScreenSize');
set(figure,'position',scrsz);
subplot(2,2,1)
surf(peaks(30))
title(' ********************** test ************************** ');
subplot(2,2,2)
surf(peaks(30))
title(' ********************** test ************************** ');
subplot(2,2,3)
surf(peaks(30))
title(' ********************** test ************************** ');
subplot(2,2,4)
surf(peaks(30))
title(' ********************** test ************************** ');
saveas(gcf,'test.tiff')
answer:
set(gcf,'PaperPositionMode','auto','PaperPosition',[0 0 20 10])
print -dtiff -r96 itest.tiff
Upvotes: 0
Views: 5376
Reputation: 26
You should change the dimensions in paper space and use "Print" instead of "Save as". For example:
set (gcf, 'PaperPositionMode', 'manual','PaperPosition',[0 0 30 20])
print -dtif -r 150 test.tiff
This will create a tiff
30x20 cm with a resolution of 150dpi.
Playing with the dimensions you can easily obtain figures with the size you need.
The attribute "position" is related to .fig
files and define the position of that files on the screen space. After printing (saving Matlab figures as pictures jpeg
, png
, tiff
or pdf
) the dimensions should be defined in the paper space.
I hope this can help.
Upvotes: 1