[R] Increasing grayscale value in scatter plot with number of points on particular location
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Jan 27 10:32:05 CET 2011
This is one of the main points of supporting semi-transparent colours.
You haven't told us your platform or graphics device (see the posting
guide), but plotting with something like col=rgb(0,0,0,0.2) may work.
On Thu, 27 Jan 2011, Aditya Bhagwat wrote:
> Dear all,
> When making a plot with the command plot(xVector, yVector), there are many
> points that collide on the same place in the plot. In order to make this
> plot clearer, I have been looking for a way to colour the points based on
> the number of points that fall onto each other. If only one point falls on a
> particular location, make it gray, if many points fall, make it black.
> I tried to search the help archives, but didn't find any useful answers.
> Anyone has any suggestion?
> Many thanks for your help!
> Aditya Bhagwat
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help