Laurent Rhelp
2014-Jun-20 19:45 UTC
[R] lattice : superpose symbols with a great many points
Hi, I like to use with xyplot (package lattice) the groups argument and superpose.symbol to compare several curves. But, when there are a great many points, the symbols are very close and the graph becomes unreadable. Would there be an argument or a tip not to draw all the symbols, for example the symbols could be drawn only every x points, x given as an argument ? Thanks Best regards Laurent --- Ce courrier ?lectronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
Christoph Scherber
2014-Jun-20 19:50 UTC
[R] lattice : superpose symbols with a great many points
Dear Laurent for numeric x variables, you could try jitter: xyplot(y~jitter(x,0.5)) Cheers Christoph Am 20.06.2014 21:45, schrieb Laurent Rhelp:> Hi, > > I like to use with xyplot (package lattice) the groups argument and > superpose.symbol to compare several curves. But, when there are a > great many points, the symbols are very close and the graph becomes > unreadable. Would there be an argument or a tip not to draw all the > symbols, for example the symbols could be drawn only every x points, x > given as an argument ? > > Thanks > Best regards > Laurent > > > > --- > Ce courrier ?lectronique ne contient aucun virus ou logiciel > malveillant parce que la protection avast! Antivirus est active. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
David Winsemius
2014-Jun-21 18:13 UTC
[R] lattice : superpose symbols with a great many points
On Jun 20, 2014, at 12:45 PM, Laurent Rhelp wrote:> Hi, > > I like to use with xyplot (package lattice) the groups argument and superpose.symbol to compare several curves. But, when there are a great many points, the symbols are very close and the graph becomes unreadable. Would there be an argument or a tip not to draw all the symbols, for example the symbols could be drawn only every x points, x given as an argument ?If decreasing the size of the points is not effective, then you it may be more informative to use densityplot.>-- David Winsemius Alameda, CA, USA
Duncan Mackay
2014-Jun-22 08:43 UTC
[R] lattice : superpose symbols with a great many points
Hi Try xyplot(y ~ x, ... pch = ".", cex = 2) You may be able to get away with cex = 1 on certain drivers but for most instances cex = 2 will be the smallest size. Regards Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England Armidale NSW 2351 Email: home: mackay at northnet.com.au -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Laurent Rhelp Sent: Saturday, 21 June 2014 05:45 To: r-help at stat.math.ethz.ch Subject: [R] lattice : superpose symbols with a great many points Hi, I like to use with xyplot (package lattice) the groups argument and superpose.symbol to compare several curves. But, when there are a great many points, the symbols are very close and the graph becomes unreadable. Would there be an argument or a tip not to draw all the symbols, for example the symbols could be drawn only every x points, x given as an argument ? Thanks Best regards Laurent --- Ce courrier ?lectronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.