plot_dist {pmxTools} | R Documentation |
Plot a distribution as a hybrid containing a halfeye, a boxplot and jittered points.
Description
Plot a distribution as a hybrid containing a halfeye, a boxplot and jittered points.
Usage
plot_dist(
dat,
yvar,
xvar = NULL,
ylim = NULL,
xlb = "",
ylb = "",
identity_line = FALSE,
identity_value = 0,
he_adjust = 0.5,
he_width = 0.6,
he_justification = -0.2,
he_col = "black",
he_fill = "#F8766D",
he_alpha = 0.9,
he_slab_type = "pdf",
he_breaks = "Sturges",
he_outline_bars = FALSE,
he_point_interval = "median_qi",
bxp_width = 0.12,
bxp_outlier_col = NA,
bxp_outlier_fill = NA,
bxp_outlier_shape = 19,
bxp_outlier_size = 1.5,
bxp_col = "black",
bxp_fill = "#F8766D",
bxp_alpha = 0.9,
bxp_notch = FALSE,
bxp_notchwidth = 0.5,
hp_range_scale = 0.4,
hp_alpha = 0.25,
hp_col = "#F8766D",
hp_transformation = position_jitter(),
na.rm = FALSE
)
Arguments
dat |
A data frame. |
yvar |
The name of the field containing values to be plotted. |
xvar |
The name of the field containing the grouping variable (defaults to 'NULL'). |
ylim |
Limits for the y-axis. Defaults to |
xlb |
Label for the x-axis. |
ylb |
Label for the y-axis. |
identity_line |
Show a line of identity? Default |
identity_value |
If an identity line is shown, it will be drawn horizontally at this y-value (default 0). |
he_adjust |
If |
he_width |
Width of the halfeye component of the plot (default 0.6). |
he_justification |
Justification of the halfeye component of the plot (default -0.2). |
he_col |
Color for the halfeye component of the plot. |
he_fill |
Fill color for the halfeye component of the plot. |
he_alpha |
Alpha for the halfeye component of the plot (default 0.9). |
he_slab_type |
The type of slab function to calculate for the halfeye component of the plot: probability density (or mass) function ( |
he_breaks |
If slab_type is |
he_outline_bars |
If slab_type is |
he_point_interval |
A function from the |
bxp_width |
Width of the boxplot component (default 0.12). |
bxp_outlier_col |
Color for outliers in the boxplot component. |
bxp_outlier_fill |
Fill color for outliers in the boxplot component. |
bxp_outlier_shape |
Shape for outliers in the boxplot component. |
bxp_outlier_size |
Size for outliers in the boxplot component. |
bxp_col |
Color for the boxplot component. |
bxp_fill |
Fill color for the boxplot component. |
bxp_alpha |
Alpha for the boxplot component. |
bxp_notch |
If |
bxp_notchwidth |
For a notched box plot, width of the notch relative to the body (default 0.5). |
hp_range_scale |
If no 'width' argument is specified in |
hp_alpha |
Alpha for the jitter. |
hp_col |
Color for the jitter. |
hp_transformation |
An evaluated |
na.rm |
If |
Value
A plot containing jittered points, a boxplot and a density plot or histogram illustrating the distribution of every group of the data under evaluation.
Author(s)
Justin Wilkins, justin.wilkins@occams.com
Examples
## Not run:
plot_dist(dat, "ETA1", identity_line = T, he_slab_type = "histogram", he_breaks = 30)
## End(Not run)