Re: [R] how to best present concentrated data points/ ggplot2

2011-07-05 Thread Joshua Wiley
Hi Yang, I would take a slightly different approach and use what Wilkinson calls stripe density plots. The idea is that if you are trying to show a univariate density on dimension 1 with many overlapping or extremely close observations, space on dimension 1 is precious, in two dimensions, space o

Re: [R] how to best present concentrated data points/ ggplot2

2011-07-05 Thread Ista Zahn
Hi Yang, Strategies for dealing with overplotting include transparency, size, and jittering. In your example you'll probably need all three. m + geom_point(aes(x = expo, y = ze, shape = type), size = 1, alpha = .2, position = position_jitter(width = 0, height = 5)) + geom_density() seems to wo

[R] how to best present concentrated data points/ ggplot2

2011-07-05 Thread Yang Lu
Hi all, I am trying to plot a weighted density plot for two different types and want to show the data points on the x axis. The code is as follows. The data points are very concentrated. Is there a better way to present it( should I set the alpha value or something else)? Thanks! YL library(