
Automatic Plot of Combined Multi Dist Data
Source:R/autoplot-combined-dist.R
tidy_combined_autoplot.Rd
This is an auto plotting function that will take in a tidy_
distribution function and a few arguments, one being the plot type, which is
a quoted string of one of the following:
density
quantile
probablity
qq
If the number of simulations exceeds 9 then the legend will not print. The plot subtitle is put together by the attributes of the table passed to the function.
Usage
tidy_combined_autoplot(
.data,
.plot_type = "density",
.line_size = 0.5,
.geom_point = FALSE,
.point_size = 1,
.geom_rug = FALSE,
.geom_smooth = FALSE,
.geom_jitter = FALSE,
.interactive = FALSE
)
Arguments
- .data
The data passed in from a the function
tidy_multi_dist()
- .plot_type
This is a quoted string like 'density'
- .line_size
The size param ggplot
- .geom_point
A Boolean value of TREU/FALSE, FALSE is the default. TRUE will return a plot with
ggplot2::ggeom_point()
- .point_size
The point size param for ggplot
- .geom_rug
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE will return the use of
ggplot2::geom_rug()
- .geom_smooth
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE will return the use of
ggplot2::geom_smooth()
Theaes
parameter of group is set to FALSE. This ensures a single smoothing band returned with SE also set to FALSE. Color is set to 'black' andlinetype
is 'dashed'.- .geom_jitter
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE will return the use of
ggplot2::geom_jitter()
- .interactive
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE will return an interactive
plotly
plot.
See also
Other Autoplot:
bootstrap_stat_plot()
,
tidy_autoplot()
,
tidy_four_autoplot()
,
tidy_multi_dist_autoplot()
,
tidy_random_walk_autoplot()
Examples
combined_tbl <- tidy_combine_distributions(
tidy_normal(),
tidy_gamma(),
tidy_beta()
)
combined_tbl
#> # A tibble: 150 × 8
#> sim_number x y dx dy p q dist_type
#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <fct>
#> 1 1 1 0.00849 -3.28 0.000250 0.503 0.00849 Gaussian c(0, 1)
#> 2 1 2 0.481 -3.14 0.000670 0.685 0.481 Gaussian c(0, 1)
#> 3 1 3 2.22 -3.00 0.00162 0.987 2.22 Gaussian c(0, 1)
#> 4 1 4 -0.0905 -2.86 0.00355 0.464 -0.0905 Gaussian c(0, 1)
#> 5 1 5 -0.439 -2.72 0.00708 0.330 -0.439 Gaussian c(0, 1)
#> 6 1 6 2.01 -2.57 0.0129 0.978 2.01 Gaussian c(0, 1)
#> 7 1 7 1.39 -2.43 0.0218 0.917 1.39 Gaussian c(0, 1)
#> 8 1 8 0.444 -2.29 0.0340 0.672 0.444 Gaussian c(0, 1)
#> 9 1 9 -0.889 -2.15 0.0499 0.187 -0.889 Gaussian c(0, 1)
#> 10 1 10 -0.890 -2.01 0.0694 0.187 -0.890 Gaussian c(0, 1)
#> # ℹ 140 more rows
combined_tbl %>%
tidy_combined_autoplot()
combined_tbl %>%
tidy_combined_autoplot(.plot_type = "qq")