[R] sizing non-vector point shapes in ggplot2

mfrumin
Mon, 16 Jun 2008 12:52:16 -0000

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
'/'

eg:
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?

eg:
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?

thanks,
mike
--
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.