plot_fr_wei: Plot Frechet-Weibull fit

Description Usage Arguments Details See Also Examples

Description

Plot Frechet-Weibull fit

Usage

1
2
3
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(). Optionally fit can be a named vector with "fr_weight", "fr_shape", "fr_scale", "wei_shape", "wei_scale". In that case, use addx to supply numeric range of data to plot.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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);
plot_fr_wei(fit1, ylim=c(0,0.005));
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))

jmw86069/salsa documentation built on May 21, 2019, 10:31 a.m.