Prev: Is it possible to vectorize this?
Next: Reassign values
From: John on 6 Jul 2010 18:22 I'm probably missing something simple here, but I'm having a problem fitting axis labels with large fonts (24) into a figure frame that's anything less than full page. With the default-sized figure window my axis labels, especially the right-hand y label (I'm using plotyy), get cut off. I'm saving my figures as .eps for use in LateX, where I need to shrink them down considerably, thus my desire for large fonts. But if I have to first make the MATLAB figure window full-screen, then I end up with a large .eps figure, and the subsequent reduction needed to fit my LateX document makes the label fonts small again. Here's some sample code of the plotting commands: [AX,H1,H2]=plotyy(times,mean_t_Dec08,times,mean_wv_Dec08); ylabel(AX(1),'Temperature (C)','fontsize',24); ylabel(AX(2),'Mixing Ratio (g/kg)','fontsize',24); set(AX(1),'XLim', [0 24]); set(AX(2),'XLim', [0 24]); set(AX(1),'XTick', 0:4:24); set(AX(2),'XTick', 0:4:24); set(AX(1),'XTickLabel',{'0','4','8','12','16','20','24'},'fontsize',20); set(AX(2),'XTickLabel',{'0','4','8','12','16','20','24'},'fontsize',20); xlabel('Hour of Day (LST)','fontsize',24); legend('T','r'); Thanks in advance for any advice on this specific case or general tips for exporting graphics with large fonts for readability in papers where the figure space is limited, e.g. with side-by-side figures inside a 5.5" page width.
From: dpb on 7 Jul 2010 09:14 John wrote: > I'm probably missing something simple here, but I'm having a problem > fitting axis labels with large fonts (24) into a figure frame that's > anything less than full page. With the default-sized figure window my > axis labels, especially the right-hand y label (I'm using plotyy), get > cut off. .... > Thanks in advance for any advice on this specific case or general tips > for exporting graphics with large fonts for readability in papers where > the figure space is limited, e.g. with side-by-side figures inside a > 5.5" page width. I've not played with the specific problem but I'd venture you need to set the position vector of the axes closer in from the figure boundaries to provide more space for such large fonts for labels. get/set(gca,'position'[,...]) --
From: John on 8 Jul 2010 19:09 dpb <none(a)non.net> wrote in message <i11upa$aib$1(a)news.eternal-september.org>... > John wrote: > > I'm probably missing something simple here, but I'm having a problem > > fitting axis labels with large fonts (24) into a figure frame that's > > anything less than full page. With the default-sized figure window my > > axis labels, especially the right-hand y label (I'm using plotyy), get > > cut off. > ... > > Thanks in advance for any advice on this specific case or general tips > > for exporting graphics with large fonts for readability in papers where > > the figure space is limited, e.g. with side-by-side figures inside a > > 5.5" page width. > > I've not played with the specific problem but I'd venture you need to > set the position vector of the axes closer in from the figure boundaries > to provide more space for such large fonts for labels. > > get/set(gca,'position'[,...]) > > -- Thanks, that did set me on the right track. Through lots of trial and error, I've been able to use position to make my graphs fit in the default window size while preserving the big fonts. For example: set(AX(1), 'Position',[0.14 0.18 0.72 0.72]) You can use this to sacrifice some of your data plot space for more label space. I've also found that controlling the tick mark labelling through YLim, YTick and YTickLabel is useful for making figures that are to be displayed side-by-side have the same look and dimensions. Cheers, John
From: Pekka Kumpulainen on 10 Jul 2010 08:13 "John " <gallagjo(a)interchange.ubc.ca> wrote in message <i15lqg$kcf$1(a)fred.mathworks.com>... > dpb <none(a)non.net> wrote in message <i11upa$aib$1(a)news.eternal-september.org>... > > John wrote: > > > I'm probably missing something simple here, but I'm having a problem > > > fitting axis labels with large fonts (24) into a figure frame that's > > > anything less than full page. With the default-sized figure window my > > > axis labels, especially the right-hand y label (I'm using plotyy), get > > > cut off. > > ... > > > Thanks in advance for any advice on this specific case or general tips > > > for exporting graphics with large fonts for readability in papers where > > > the figure space is limited, e.g. with side-by-side figures inside a > > > 5.5" page width. > > > > I've not played with the specific problem but I'd venture you need to > > set the position vector of the axes closer in from the figure boundaries > > to provide more space for such large fonts for labels. > > > > get/set(gca,'position'[,...]) > > > > -- > > Thanks, that did set me on the right track. Through lots of trial and error, I've been able to use position to make my graphs fit in the default window size while preserving the big fonts. For example: > > set(AX(1), 'Position',[0.14 0.18 0.72 0.72]) > > You can use this to sacrifice some of your data plot space for more label space. I've also found that controlling the tick mark labelling through YLim, YTick and YTickLabel is useful for making figures that are to be displayed side-by-side have the same look and dimensions. > Cheers, > John Just for an alternative.. Instead of using large fonts and shrinking to arbitrary size afterwards you could set the font size to exactly what is requested in the final publication and export the figure at the size to appear by setting the PaperPosition property. set(0,'DefaultAxesFontSize',8) [AX,H1,H2]=plotyy(1:25,randn(25,1),1:25,rand(25,1)); ylabel(AX(2),'Mixing Ratio (g/kg)') ylabel(AX(1),'Temperature (C)') xlabel('Hour of Day (LST)'); Now if you want a 3 by 2 inc figure: set(gcf,'PaperUnits','inches','PaperPosition',[0 0 3 2]) To see the result on screen: set(gcf,'Units','inches','Position',[2 2 3 2]) You still need to fiddle with the axes position to keep the labels: set(AX,'Position',[.13 .17 .75 .8]) Then print to eps and it _should_ be 3 by 2 inches with fontsize 8 without resizing. hth
|
Pages: 1 Prev: Is it possible to vectorize this? Next: Reassign values |