Eduardo M. A. M. Mendes
2014-May-10 21:26 UTC
[R] How to change the font size on the title of a xyplot
Hello I am using xyplot (lattice) to plot a xts variable. There are 20 variables within the xts variable (index by a datetime vector sampled every 1 minute). The results are very nice and help me to understand what is going on with the data. However since the names (labels of each variable) within the xts variable are large, the title of each plot is cropped. How can I select the font size of the titles without changing all other fonts? Many thanks Ed
David Winsemius
2014-May-10 22:05 UTC
[R] How to change the font size on the title of a xyplot
On May 10, 2014, at 2:26 PM, Eduardo M. A. M. Mendes wrote:> Hello > > I am using xyplot (lattice) to plot a xts variable. There are 20 variables within the xts variable (index by a datetime vector sampled every 1 minute). The results are very nice and help me to understand what is going on with the data. However since the names (labels of each variable) within the xts variable are large, the title of each plot is cropped. How can I select the font size of the titles without changing all other fonts? >tp <- trellis.par.get() names(tp) ... includes "par.main.text", so my first try was to use the xyplot() facilities to change cex for 'main'. Seems to work as expected: xyplot( 1~1, main="test", par.settings=list(par.main.text=list(cex=5))) -- David Winsemius Alameda, CA, USA
Greg Johnson`
2014-May-10 22:05 UTC
[R] How to change the font size on the title of a xyplot
Eduardo M. A. M. Mendes <emammendes <at> gmail.com> writes:> > Hello > > I am using xyplot (lattice) to plot a xts variable. There are 20 variableswithin the xts variable (index by a> datetime vector sampled every 1 minute). The results are very nice and helpme to understand what is going> on with the data. However since the names (labels of each variable) withinthe xts variable are large, the> title of each plot is cropped. How can I select the font size of thetitles without changing all other fonts?> > Many thanks > > Ed > >Ed, you can try: xyplot( y~x, main=list("title",cex=somevalue ) ) Greg