Don Armstrong
2003-Mar-11 20:08 UTC
[R] changing pen mode [or adjusting for overlapping points?]
I'm ploting a rather large number of points [~24,000] in two series with slightly different distributions. I would like to be able to effectively see where the two distributions overlap by setting the pen mode (or it's equivalent) to allow the overlapping portion to show up as a different color (or different shade). Unfortunatly, I couldn't find an option in par or postscript that looks like it would be of use. Ideas or suggestions? Don Armstrong -- She was alot like starbucks. IE, generic and expensive. -- hugh macleod http://www.gapingvoid.com/batch3.htm http://www.donarmstrong.com http://www.anylevel.com http://rzlab.ucr.edu -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/20030311/ee13aa1d/attachment.bin
Spencer Graves
2003-Mar-11 20:24 UTC
[R] changing pen mode [or adjusting for overlapping points?]
plot(1:2, col=1:2) Is this what you want? Spencer Graves Don Armstrong wrote:> I'm ploting a rather large number of points [~24,000] in two series > with slightly different distributions. > > I would like to be able to effectively see where the two distributions > overlap by setting the pen mode (or it's equivalent) to allow the > overlapping portion to show up as a different color (or different > shade). > > Unfortunatly, I couldn't find an option in par or postscript that > looks like it would be of use. > > Ideas or suggestions? > > > Don Armstrong > > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Marc Schwartz
2003-Mar-11 20:58 UTC
[R] changing pen mode [or adjusting for overlapping points?]
>-----Original Message----- >From: r-help-bounces at stat.math.ethz.ch >[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Don Armstrong >Sent: Tuesday, March 11, 2003 2:08 PM >To: r-help at stat.math.ethz.ch >Subject: [R] changing pen mode [or adjusting for overlapping points?] > > >I'm ploting a rather large number of points [~24,000] in two >series with slightly different distributions. > >I would like to be able to effectively see where the two >distributions overlap by setting the pen mode (or it's >equivalent) to allow the overlapping portion to show up as a >different color (or different shade). > >Unfortunatly, I couldn't find an option in par or postscript >that looks like it would be of use. > >Ideas or suggestions? > > >Don ArmstrongI may be mis-understanding what you are trying to do, but if you are using plot() to generate a scatter plot (as opposed to a density plot) and there are actual overlapping points between the two sets, you could use jitter() to introduce some random noise into the plotted points. Something like this might work, presuming that (x1, y1) and (x2, y2) are your two sets of points:> plot(x1, y1, pch = 16, col = "red") > points(jitter(x2), jitter(y2), pch = 16, col = "blue")The first plot() draws the initial set of data and points() adds the second set of data to the same plot, but in a different color with some random noise added to the points. If that is not what you need, let us know. Marc Schwartz