deepayan / lattice

Trellis Graphics for R
http://lattice.r-forge.r-project.org/
Other
68 stars 15 forks source link

Point size as a function of a variable. #3

Open skanskan opened 7 years ago

skanskan commented 7 years ago

Please add an option to modify "point" sizes proportionally to a given variable.

For example with ggplot I can do it with ggplot(mydata,aes(x=numb, y=cars))+geom_point(aes(size=mysize))+geom_line(aes(group=id, color="blue"), show.legend = FALSE) but it's very slow.

I've tried with lattice: xyplot(cars~numb , type="b", col="black", col.line="blue", data=mydata, pch=16, cex= mydata$mysize*3, lwd=1 , groups= mydata$id) But it doesn't seem to produce an equivalent result

https://stackoverflow.com/questions/44674741/how-to-change-point-size-in-lattice

deepayan commented 7 years ago

This is supported by Hmisc::xYplot()