topoScatter | R Documentation |
Draw a 'topographical scatterplot' or 'scatter-heatmap'
topoScatter(
x,
y,
resolution = 20,
thresh = 5,
topoCol = colorRampPalette(c("black", "red", "yellow"))(20),
maxFreq = NULL,
xlim = range(x, na.rm = TRUE),
ylim = range(y, na.rm = TRUE),
log = "",
...
)
x |
a vector of x-coordinates |
y |
a vector of y-coordinates (must match x in length) |
resolution |
the resolution of the plot, that is into how many bins each axis will be sub-divided. Defaults to 20. |
thresh |
a threshold of how many data points must fall into a bin before it they replaced with a density-indicating color |
topoCol |
a vector of colors defining a color gradient to use for the density map |
xlim |
the x-axis range (see plot()). |
ylim |
the y-axis range (see plot()). |
log |
As in plot(). "x" draws the x-axis in log scale, "y" draws the y-axis in log-scale, "xy" draws both in log scale, "" draws both linearly. |
x <- rnorm(10000,0,1)+10
y <- rnorm(10000,0,1)+10
topoScatter(x,y,resolution=60,xlab="foo",ylab="bar",thresh=2)
topoScatter(x,y,log="xy",resolution=60,xlab="foo",ylab="bar")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.