[R] Ajdustment of data symbols

David L Carlson dcarlson at tamu.edu
Thu Dec 1 17:18:49 CET 2016

Try this. The par("cxy") gets a vector of character width and height in user coordinates.

points(0.25, par("usr")[3]-par("cxy")[2]/2, pch = 17, col = "red", cex = 2, xpd = TRUE)

David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Giovanni Petris
Sent: Thursday, December 1, 2016 10:01 AM
To: r-help at r-project.org
Cc: Giovanni Petris
Subject: [R] Ajdustment of data symbols


Is there a way to specify a non-default adjustment for data symbols, similar to what "adj" does for text? 

For example, the following lines of code produce a red triangle on the bottom border of the plot:

plot(0, 0, type = 'n', xlab = "", ylab = "")
points(0.25, par("usr")[3], pch = 17, col = "red", cex = 2, xpd = TRUE)

I would like to draw the triangle completely outside the plotting area, with the upper vertex touching the x-axis...

Thank you in advance!


Giovanni Petris, PhD
Director of Statistics
Department of Mathematical Sciences
University of Arkansas - Fayetteville, AR 72701
Ph: (479) 575-6324, 575-8630 (fax)

R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
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