Skip to content
Back to formatted view

Raw Message

Message-ID: <16024549.post@talk.nabble.com>
Date: 2008-03-13T10:46:30Z
From: Tom La Bone
Subject: Specifying relative position of text in a plot
In-Reply-To: <B998A44C8986644EA8029CFE6396A9240100CD28@exqld2-bne.nexus.csiro.au>

Thanks for all of the suggestions. The key key here seems to be using the
"par" function to change the coordinate system like so 

plot(rnorm(100), rnorm(100))
op <- par("usr")
par(usr = c(0, 1, 0, 1))
text(0.5,0.5,"TEST")
par(usr = op)

Prof Ripley commented that this approach will also work on log plots, but I
don't think I completely understand what is going on because this does not
work for me

plot(rlnorm(100), rlnorm(100),log="xy")
op <- par("usr")
par(usr = c(0, 1, 0, 1))
text(0.5,0.5,"TEST")
par(usr = op)

Any hints on what I am doing wrong with the log plots? Thanks again for the
help.

Tom


-- 
View this message in context: http://www.nabble.com/Specifying-relative-position-of-text-in-a-plot-tp16002549p16024549.html
Sent from the R help mailing list archive at Nabble.com.