Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

removing text added to a plot with mtext

Tags:

text

plot

r

Having added text to an R plot with mtext

e.g.

mtext("my added text",side=1)

How can I remove it?

like image 809
Mark Avatar asked Aug 18 '11 02:08

Mark


1 Answers

Make another plot. (They are dirt cheap after all). mtext like most base graphic functions operates via a one-way side-effect model of plotting. There is no underlying storage facility that can be modified after the fact. ( I in the past have tried writing over with identical col="white" letters but it looks terrible.) Failing that, if one is on an OS that has a default "Save as.." that creates a pdf file, then one can use a pdf-editing program.

like image 195
IRTFM Avatar answered Oct 15 '22 08:10

IRTFM