Dear Help Desk, Is there any way to change some of the labels on R diagrams? Specifically in histograms, I would like to: 1. change the word frequency to count. 2. Make the font of the title (Histogram of …) smaller. 3. Have a different word below the histogram than the one occurring in the title (right now if you choose X for your variable, it comes both above the histogram (in the phrase Histogram of X) and below it). Thanks for your time, Nima --------------------------------- [[alternative HTML version deleted]]
First of all, this is not a "Help Desk". Second, please make sure that you put an informative subject line: I thought this was spam and was going to delete it. Thanks, Ranjan On Sat, 21 Apr 2007 12:03:24 -0700 (PDT) Nima Tehrani <nisate at yahoo.com> wrote:> Dear Help Desk, > > Is there any way to change some of the labels on R diagrams? > > Specifically in histograms, I would like to: > > 1. change the word frequency to count. > 2. Make the font of the title (Histogram of) smaller.> 3. Have a different word below the histogram than the one occurring in the title (right now if you choose X for your variable, it comes both above the histogram (in the phrase Histogram of X) and below it). > > Thanks for your time, > Nima > > > --------------------------------- > > > [[alternative HTML version deleted]] >
On Sat, 2007-04-21 at 12:03 -0700, Nima Tehrani wrote:> Dear Help Desk, > > Is there any way to change some of the labels on R diagrams? > > Specifically in histograms, I would like to: > > 1. change the word frequency to count. > 2. Make the font of the title (Histogram of ) smaller. > 3. Have a different word below the histogram than the one occurring in the title (right now if you choose X for your variable, it comes both above the histogram (in the phrase Histogram of X) and below it). > > Thanks for your time, > Nimadat <- rnorm(100) hist(dat, ylab = "Count", cex.main = 0.7, xlab = "Something else") for example. But this is all R 101 and you could have found this by reading the "An Introduction to R" manual that comes with your R installation or can be found at the R website (www.r-project.org Manuals section of menu), and by reading the help for ?hist and ?par (for cex.main).> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.Please do. HTH G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [t] +44 (0)20 7679 0522 ECRC & ENSIS, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/cv/ London, UK. WC1E 6BT. [w] http://www.ucl.ac.uk/~ucfagls/ %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
hist(rnorm(100),xlab="Data",ylab="Count",main="") title(main="Histogram of ...",cex=0.5) see ?par for details on xlab, ylab, main, and cex arguments. You can call these from title() or include them in hist(). I called title(main=..) separately to control its size separately from the rest of the text (axis and tick labels). --- Nima Tehrani <nisate at yahoo.com> wrote:> Dear Help Desk, > > Is there any way to change some of the labels on R diagrams? > > Specifically in histograms, I would like to: > > 1. change the word frequency to count. > 2. Make the font of the title (Histogram of) smaller.> 3. Have a different word below the histogram than the one > occurring in the title (right now if you choose X for your variable, it > comes both above the histogram (in the phrase Histogram of X) and below > it). > > Thanks for your time, > Nima > > > --------------------------------- > > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >