get.histogramscale {datplot} | R Documentation |
Scaling Factor for Combined Histogram Plots
Description
Requires a data.frame as produced by [datsteps()] or a number as DAT_df_steps. Calculates the value with which the y-axis of a density graph should be multiplied by in order to be visible in the corresponding histogram.
Usage
get.histogramscale(DAT_df_steps, binwidth = "stepsize")
Arguments
DAT_df_steps |
a data.frame as returned by [datsteps()]. (Will also work with a single number and a vector.) |
binwidth |
the bandwidth to use for the density function and histogram. Should equal the stepsize used to create the data.frame. If a data.frame as returned by [datsteps()] is given, stepsize can be automatically assigned using the corresponding attribute ('binwidth = "stepsize"') |
Value
the value with which to scale the density curve to a histogram plot so that both will be visible
Examples
data("Inscr_Bithynia")
DAT_df <- Inscr_Bithynia[, c("ID", "Location", "DAT_min", "DAT_max")]
DAT_df_steps <- datsteps(DAT_df, stepsize = 25)
get.histogramscale(DAT_df_steps)
get.histogramscale(DAT_df_steps$DAT_step, binwidth = 20)
get.histogramscale(500, binwidth = 20)
[Package datplot version 1.1.1 Index]