ggInterval_2Dhist {ggESDA} | R Documentation |
visualize a 2-dimension histogram by symbolic data with ggplot package.
Description
Visualize the two continuous variable distribution by dividing both the x axis and y axis into bins,and calculating the frequency of observation interval in each bin.
Usage
ggInterval_2Dhist(data = NULL,mapping = aes(NULL)
,xBins = 14,yBins=16,removeZero = FALSE,
addFreq = TRUE)
Arguments
data |
A ggESDA object. It can also be either RSDA object or classical data frame,which will be automatically convert to ggESDA data. |
mapping |
Set of aesthetic mappings created by aes() or aes_(). If specified and inherit. aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping. It is the same as the mapping of ggplot2. |
xBins |
x axis bins, which mean how many partials x variable will be separate into. |
yBins |
y axis bins.It is the same as xBins. |
removeZero |
whether remove data whose frequency is equal to zero |
addFreq |
where add frequency text in each cells. |
Value
Return a ggplot2 object.
Examples
ggInterval_2Dhist(oils, aes(x = GRA, y = FRE),
xBins = 5, yBins = 5)