Paul Shannon
2008-Jun-24 21:21 UTC
[R] spineplot (graphics package): how to control font size?
I cannot modify the font size of the standard text items for the splineplot function found in the standard graphics package. Here is a tiny example, in which I try (but fail) to make the main title large. tbl = read.table ('http://www.ggobi.org/book/data/tips.csv', sep=',', header=T) spineplot (table (tbl$DAY, tbl$SEX), main='TIPS', cex.main=3) None of the other 'cex' parameters seem to work either, but cex.main is probably a sufficient example. Any tips for me? Thanks! - Paul
Duncan Murdoch
2008-Jun-24 22:37 UTC
[R] spineplot (graphics package): how to control font size?
On 24/06/2008 5:21 PM, Paul Shannon wrote:> I cannot modify the font size of the standard text items for the > splineplot function > found in the standard graphics package. Here is a tiny example, in > which > I try (but fail) to make the main title large. > > tbl = read.table ('http://www.ggobi.org/book/data/tips.csv', > sep=',', header=T) > spineplot (table (tbl$DAY, tbl$SEX), main='TIPS', cex.main=3) > > None of the other 'cex' parameters seem to work either, but cex.main > is probably > a sufficient example.None of the cex parameters is listed as a parameter on ?spineplot, so presumably they just aren't there. You will have to plot with blank titles, and use title(main='TIPS', cex.main=3) in a following call. Duncan Murdoch> > Any tips for me? Thanks! > > - Paul > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Mark Difford
2008-Jun-25 11:28 UTC
[R] spineplot (graphics package): how to control font size?
Hi Paul, Duncan has shown you how to do it. There is often a simpler route that is worth knowing about. Whether it works depends on how the function was coded. In this case it works: ## Example par(cex.main = 3) spineplot (table (tbl$DAY, tbl$SEX), main='TIPS') par(cex.main = 1.2) spineplot (table (tbl$DAY, tbl$SEX), main='TIPS') HTH, Mark. Paul Shannon wrote:> > I cannot modify the font size of the standard text items for the > splineplot function > found in the standard graphics package. Here is a tiny example, in > which > I try (but fail) to make the main title large. > > tbl = read.table ('http://www.ggobi.org/book/data/tips.csv', > sep=',', header=T) > spineplot (table (tbl$DAY, tbl$SEX), main='TIPS', cex.main=3) > > None of the other 'cex' parameters seem to work either, but cex.main > is probably > a sufficient example. > > Any tips for me? Thanks! > > - Paul > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- View this message in context: http://www.nabble.com/spineplot-%28graphics-package%29%3A-how-to-control-font-size--tp18100372p18110125.html Sent from the R help mailing list archive at Nabble.com.