Description Usage Arguments Details Value Author(s) See Also
plot2Dhist generates a two-dimensional histogram image.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
xdata, ydata |
Numeric vectors or matrices of the same size, with data to be plotted as a 2D-histogram. Data may also be passed in with xdata only, as a two-column array, data.frame or matrix with numeric values, but in this case, ALL SUBSEQUENT ARGUMENTS MUST BE NAMED. |
breaks, xbreaks, ybreaks |
Same as breaks argument to |
base |
Number specifying base for the z-axis. Default of 1 plots the intensities in each bin, untransformed. If a value greater than one is supplied, the z-axis is transformed as log(intensities+1, base). |
col |
Vector of colors specifying colormap to use. See, for example,
|
xlab, ylab |
Labels for the x- and y-axes. If omitted, the names of the variables used for the xdata and ydata arguments will be used. |
plot.zero |
Value to plot zero count bins. Use NA to make those cells with
zero counts behave as NA's (i.e. having no color; see help for
|
... |
Additional arguments passed to |
This function calculates a histogram of the join distribution of two variables, and plots the resulting matrix as a heatmap with the first variable along the x axis an the second along the y, with values increasing from the lower left corner. The axes are presented in the units of the input data (i.e., not bin numbers, but their values.)
Returns a list object with named elements:
xbreaks, ybreaks The breaks specifying binning of x- and y-data.
xmids, ymids Midpoints of the bins.
intensities Matrix with number of counts in each bin.
zdata Matrix of z-axis data as plotted (i.e., log transformed if base!=1).
xdata, ydata, base Same as input arguments.
M.W.Rowe, mwr.stats@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.