Thank you all.
par(usr)
is the perfect solution.
It *is* in the help files, but was quite hard to find.
Thomas
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
I want to write some text in a corner of my plot.
Is it possible to get the xlim and ylim of an open window?
Or is there anything similar like
legend(x=bottomright, inset=0.01,legend=...)
for
text(x=1,y=2, test)
Thomas
__
R-help@stat.math.ethz.ch
On Thu, 2006-02-09 at 17:18 +0100, Thomas Steiner wrote:
I want to write some text in a corner of my plot.
Is it possible to get the xlim and ylim of an open window?
Or is there anything similar like
legend(x=bottomright, inset=0.01,legend=...)
for
text(x=1,y=2, test)
Thomas
Try this:
You can get the x and y position of any place of an open graphic device
with the mouse cursor, using the function locator(), and even assing
this values to an object, as in:
xy-locator()
You will have a list with x and y positions. Then you can use:
text(xy$x,xy$y,...)
See ?locator.
HTH,
On 2/9/2006 11:18 AM, Thomas Steiner wrote:
I want to write some text in a corner of my plot.
Is it possible to get the xlim and ylim of an open window?
Or is there anything similar like
legend(x=bottomright, inset=0.01,legend=...)
for
text(x=1,y=2, test)
par(usr)
gives you the limits.
?par, look at usr (which is how legend does it)
On Thu, 9 Feb 2006, Thomas Steiner wrote:
I want to write some text in a corner of my plot.
Is it possible to get the xlim and ylim of an open window?
Or is there anything similar like
legend(x=bottomright, inset=0.01,legend=...)
for
of the data then
you might want to look at the cnvrt.coords function in the TeachingDemos
package.
-Original Message-
From: [EMAIL PROTECTED] on behalf of Thomas Steiner
Sent: Thu 2/9/2006 9:18 AM
To: r-help@stat.math.ethz.ch
Subject: [R] putting text in the corner
I want to write some
Fernando Mayer wrote:
You can get the x and y position of any place of an open graphic device
with the mouse cursor, using the function locator(), and even assing
this values to an object, as in:
xy-locator()
You will have a list with x and y positions. Then you can use: