[R] Text in a plot without x axis

David Carlson dcarlson at tamu.edu
Thu Oct 24 21:47:12 CEST 2013


You should provide an example of what you are trying to do. Try
this

> plot(0, 1, xlab="", xaxt="n")
> text(locator(1), "This is my text", xpd=TRUE)

The xpd= parameter controls the clipping region. The default
xpd=FALSE clips text to the plot region. You were not clear, but
if you were trying to plot outside the axes, you need xpd=TRUE
to clip to the figure region or xpd=NA to clip to the device
region.

-------------------------------------
David L Carlson
Associate Professor 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 Ahmed Attia
Sent: Thursday, October 24, 2013 2:10 PM
To: r-help at r-project.org
Subject: [R] Text in a plot without x axis

Dear R users,

Can I add a text to a plot without x axis?

I saw a function that enables placing the text with mouse

text(location, "text to place", pos, ...)

locator(1)

but it did not work out.

-- 
Ahmed M. Attia


Research Assistant
Dept. Of Soil&Crop Sciences
Texas A&M University
ahmed.attia at ag.tamu.edu
Cell phone: 001-979-248-5215

______________________________________________
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