Plot Frechet-Weibull fit

plot_fr_wei(fit, addx = NULL, ylim = NULL, xlim = NULL,
  scale_y = FALSE, log = "x", type = c("gg", "base"),
  highlight_range = NULL, do_facet = TRUE, ...)

Arguments

fit

fitdist object as output from fitdist_fr_wei().

addx

optional numeric vector of x values to add to the x-axis range.

ylim, xlim

optional numeric vector describing the y-axis or x-axis limits, respectively.

scale_y

logical indicating whether to scale the densities to common maximum height of y=1.

log

character vector indicating the axis or axes log-transform, with any presence of "x" and "y".

type

character string indicating the type of plot, where "gg" uses ggplot2, and "base" uses base R graphics.

highlight_range

optional numeric range to highlight, intended to represent the range of counts selected for downstream analysis.

do_facet

logical indicating whether to create a ggplot2::facet_wrap() output, which puts a colored title bar above the plot panel.

...

additional arguments are ignored.

Details

This function plots the two distributions, Frechet and Weibull, using the fit parameters provided.

See also

Other SALSA visualization functions: rank_count_plot

Examples

library(salsa); data(oz2_numi_per_cell); param_fr_wei <- params_fr_wei(); usecounts <- sort(oz2_numi_per_cell$count); usecounts <- usecounts[usecounts >= 16]; fit1 <- fitdist_fr_wei(x=usecounts, param_fr_wei=param_fr_wei); plot_fr_wei(fit1);
#> Warning: package ‘colorspace’ was built under R version 3.5.2
plot_fr_wei(fit1, ylim=c(0,0.005));
#> Warning: Removed 80 rows containing missing values (geom_path).
plot_fr_wei(fit1, scale_y=TRUE) + ggtitle("densities scaled to max height")
plot_fr_wei(fit1, scale_y=TRUE, highlight_range=c(100, 2200))