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, projsig = FALSE,
xdata = NULL, ydata = NULL, pch.dust = '.', cex.dust = 1, ...)
Run for the side effect of making a nice plot.
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?
Logical; do you want projected density PDFs to be displayed above and to the side of the standard plot.magbin
plot? If so you also need to pass the same xdata and ydata that you originally sent to magbin
, since this is not stored in the object output from magbin
.
Logical; if projden = TRUE then this will optionally add lines to show the pseudo 1-sigma range (15.9% to 84.1% quantiles).
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.
Dots to be passed to magplot
, magmap
and magmap
. Relevant arguments are matched, so look in those functions for optional arguments to pass.
Aaron Robotham
magbin
temp = magbin(rnorm(1e4), rnorm(1e4), plot=FALSE)
plot(temp, xlab='x', ylab='y')
Run the code above in your browser using DataLab