[R] sizing non-vector point shapes in ggplot2

From: mfrumin <michael_at_frumin.net>
Date: Mon, 16 Jun 2008 05:52:16 -0700 (PDT)

Dear all,

With normal plotting, one can size a set of points in a plot using a vector argument to cex in the points() function. This works whether you are using one of the standard R symbols (i.e. 19+) or some ascii symbol, such as '/'

plot(1:10, 1:10, type='n');
points(1:10, 1:10, cex = 1:10, pch = '/')

Trying to make the transition to ggplot2, I find that the aesthetic size mapping does not apply if i do geom_point(..., shape='/') -- the points show up looking like '/' but they are not sized. Is there anything to do about this?

ggplot(data = data.frame(x = 1:10, y = 1:10, size = 1:10), aes(x = x, y = y)) + geom_point(mapping = aes(size = size), shape = '/')

the plot that I'm making really needs a vertically oriented mark, not a round-ish point/square/triangle that takes up a lot of area. am I totally out of luck?


View this message in context: http://www.nabble.com/sizing-non-vector-point-shapes-in-ggplot2-tp17863871p17863871.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 16 Jun 2008 - 13:31:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 16 Jun 2008 - 16:30:44 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive