[R] Ajdustment of data symbols

Giovanni Petris gpetris at uark.edu
Thu Dec 1 17:31:50 CET 2016

That's exactly what I was looking for! 

Thank you,

From: David L Carlson <dcarlson at tamu.edu>
Sent: Thursday, December 1, 2016 10:18
To: Giovanni Petris; r-help at r-project.org
Subject: RE: Ajdustment of data symbols

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 https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=DgIFAg&c=7ypwAowFJ8v-mw8AB-SdSueVQgSDL4HiiSaLK01W8HA&r=C3DNvy_azplKSvJKgvsgjA&m=eJAlQ1Qalin1IVzkWmqtiDeAOsMhi2ionhGq4KT4u7g&s=jW3W6tyyH73FqGxaGgFKnmreBfxV0cwwV9dw0o0gdPc&e=
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list