[R] clearing some part of a graph

Hotz, T. th50 at leicester.ac.uk
Tue Jul 15 15:53:15 CEST 2003


Dear Vincent,

You can't clear a title only. The idea is to plot without one, like

plot(...,main="",sub="",xlab="",ylab="")

and add the title by hand (as you mentioned).

Moreover, AFAIK you can't clear one plot in a multiple figure environment,
since you can only clear the graphics device (not the plot),
but you can put a new plot onto a specific part of your m.f.e. using

par(mfg=c(i,j))

see ?par and "An Introduction to R" for more details.
(I have to admit that I am unsure whether that will remove a plot there,
or create the new one on top of it - hiding the old one. That matters
with respect to dev.copy() I assume.)

HTH

Thomas

---

Thomas Hotz
Research Associate in Medical Statistics
University of Leicester
United Kingdom

Department of Epidemiology and Public Health
22-28 Princess Road West
Leicester
LE1 6TP
Tel +44 116 252-5410
Fax +44 116 252-5423

Division of Medicine for the Elderly
Department of Medicine
The Glenfield Hospital
Leicester
LE3 9QP
Tel +44 116 256-3643
Fax +44 116 232-2976


> -----Original Message-----
> From: vincent.stoliaroff at sgcib.com 
> [mailto:vincent.stoliaroff at sgcib.com]
> Sent: 15 July 2003 14:31
> To: r-help at stat.math.ethz.ch
> Subject: [R] clearing some part of a graph
> 
> 
> Hi R lovers
> 
> 2 questions:
> 
> 1) I'd like to know how to clean the title, the sub title or 
> the labels of
> a graph. I know how to redefine it with the function title() but it
> overwrites the previous title and do not replace it
> 
> 2) How could I clear a whole plot (for example in a multiple figure
> environment)
> 
> thanks for your help
> vincent
> 
> 
> 
> 
> 
> 
> ******************************************************************
> The sender's email address has changed to 
> firstname.lastname@ sgcib.com. You may want to update your 
> personal address book. Please see http://www.sgcib.com for more 
> information.
>                                **
> This message and any attachments (the "message") are 
> confide...{{dropped}}
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>




More information about the R-help mailing list