[R] density plot on a log scale

field.cady field.cady at gmail.com
Thu Jun 14 11:08:13 CEST 2012


I'm working with a large dataset - large enough that when I do a scatter plot
the points all blur together, so I want to plot their density by color - a
heat map or something like that.  I've used smoothScatter for tasks like
this, but the problem is that my current dataset really only looks good on a
log-log scale.  When I do the following command

smoothScatter(
        data,
        xlim=c(100,100000000),
        ylim=c(100,10000000000),
        log="xy",
        pch="."
)

the output seems to only show a few of the points, and they are in odd
places that don't seem to correlate at all with the colors.  I got a warning
that I should increase the gridsize, but even using comically large values
(nbin=10000) didn't help.  Does anybody know how I can do this?  Thanks!

--
View this message in context: http://r.789695.n4.nabble.com/density-plot-on-a-log-scale-tp4633347.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list