[R] Label customization in R plots

David Carlson dcarlson at tamu.edu
Mon Apr 28 23:15:04 CEST 2014


You can also use the legend() function which will draw the box
and arrange the text in a single column (or three columns if you
want a single row). It also has shortcuts for positioning the
box such as "topleft" or "bottomright."

?legend

for more details.

-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org] On Behalf Of David
Winsemius
Sent: Monday, April 28, 2014 2:37 PM
To: Ayan Mitra
Cc: r-help at r-project.org
Subject: Re: [R] Label customization in R plots


On Apr 28, 2014, at 10:47 AM, Ayan Mitra wrote:

> Hi all,
>         I am a new comer in R . i am trying to figure out how
to put in the
> label of a plot the basic statistics values like mean=
>               no of data = 
>               media = 
>               chi-square =

In base graphics you could do this with functions 'rect' and
'text'.

For lattice (and probably ggplot2), there is a gridExtra package
that has 'tableGrob'

-- 

David Winsemius
Alameda, CA, USA

______________________________________________
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.



More information about the R-help mailing list