Plot 2D histogram counts or a third (z) axis summary statistic in 2D cells of different shapes.
# S3 method for magbin
plot(x, colramp = hcl.colors(21), colstretch = "lin",
sizestretch = "lin", colref = "count", sizeref = "none", add = FALSE,
dobar = TRUE, title = colref, colnorm = FALSE, projden = FALSE, xdata = NULL,
ydata = NULL, pch.dust = '.', cex.dust = 1, ...)
Object of class 'magbin'.
Vector; a colour palette to use. Must be a vector and not a function.
Character scalar; colour stretch, either linear (lin, default) or logarithmic (log, good for large dynamic ranges).
Character scalar; size stretch, either linear (lin, default) or logarithmic (log, good for large dynamic ranges).
Character scalar; colour reference for call, either it should be based on the counts (count) or the z-axis statistic (zstat)?
Character scalar; colour reference for call, either it should be ignored (none, so all are the same size and closely packed), based on the counts (count) or the z-axis statistic (zstat)?
Logical; should bins be added to the current plot? If FALSE then a new plot will be made.
Logical; should a colour bar be added to the plot?
Character scalar; title to use for the \link{magbar} label.
Logical; should the colour bar be normalised so the maximum value equals 1?
Numeric vector; the original x data sent to magbin
. Only relevant if projden=TRUE.
Numeric vector; the original y data sent to magbin
. Only relevant if projden=TRUE.
Scalar; pch symbol to use for the dust points.
Scalar; cex size to use for the dust points.
Run for the side effect of making a nice plot.
# NOT RUN {
temp = magbin(rnorm(1e4), rnorm(1e4), plot=FALSE)
plot(temp, xlab='x', ylab='y')
# }
Run the code above in your browser using DataLab