|
1 |
| -#' Default bayesplot plotting theme |
| 1 | +#' Default **bayesplot** plotting theme |
2 | 2 | #'
|
3 |
| -#' The \code{\link{theme_default}} function returns the default ggplot |
4 |
| -#' \link{theme} used by the \pkg{bayesplot} plotting functions. See |
5 |
| -#' \code{\link{bayesplot_theme_set}} for details on setting and updating the |
6 |
| -#' plotting theme. |
| 3 | +#' The [theme_default()] function returns the default ggplot |
| 4 | +#' [theme][ggplot2::theme] used by the **bayesplot** plotting functions. See |
| 5 | +#' [bayesplot_theme_set()] for details on setting and updating the plotting |
| 6 | +#' theme. |
7 | 7 | #'
|
8 | 8 | #' @export
|
9 | 9 | #' @param base_size,base_family Base font size and family (passed to
|
10 |
| -#' \code{\link[ggplot2]{theme_bw}}). It is possible to set |
11 |
| -#' \code{"bayesplot.base_size"} and \code{"bayesplot.base_family"} via |
12 |
| -#' \code{\link{options}} to change the defaults, which are \code{12} and |
13 |
| -#' \code{"serif"}, respectively. |
14 |
| -#' @return A ggplot \link[ggplot2]{theme} object. |
| 10 | +#' [ggplot2::theme_bw()]). It is possible to set `"bayesplot.base_size"` and |
| 11 | +#' `"bayesplot.base_family"` via [options()] to change the defaults, which are |
| 12 | +#' `12` and `"serif"`, respectively. |
| 13 | +#' @return A ggplot [theme][ggplot2::theme] object. |
15 | 14 | #'
|
16 |
| -#' @seealso \code{\link{bayesplot_theme_set}} to change the ggplot theme. |
| 15 | +#' @seealso [bayesplot_theme_set()] to change the ggplot theme. |
17 | 16 | #' @template seealso-colors
|
18 | 17 | #' @template seealso-helpers
|
19 | 18 | #'
|
@@ -62,36 +61,34 @@ theme_default <-
|
62 | 61 | }
|
63 | 62 |
|
64 | 63 |
|
65 |
| -#' Get, set, and modify the active bayesplot theme |
| 64 | +#' Get, set, and modify the active **bayesplot** theme |
66 | 65 | #'
|
67 |
| -#' @description These functions are the \pkg{bayesplot} equivalent to |
68 |
| -#' \pkg{ggplot2}'s \code{\link[ggplot2]{theme_set}} and friends. They set, |
69 |
| -#' get, and update the active theme but only apply them to \code{bayesplots}. |
70 |
| -#' The current/active theme is automatically applied to every \code{bayesplot} |
71 |
| -#' you draw. |
| 66 | +#' @description These functions are the **bayesplot** equivalent to |
| 67 | +#' **ggplot2**'s [ggplot2::theme_set()] and friends. They set, get, and update |
| 68 | +#' the active theme but only apply them to `bayesplots`. The current/active |
| 69 | +#' theme is automatically applied to every `bayesplot` you draw. |
72 | 70 | #'
|
73 |
| -#' Use \code{bayesplot_theme_get} to get the current \pkg{bayesplot} theme, |
74 |
| -#' and \code{bayesplot_theme_set} to change it. \code{bayesplot_theme_update} |
75 |
| -#' and \code{bayesplot_theme_replace} are shorthands for changing individual |
76 |
| -#' elements. |
| 71 | +#' Use `bayesplot_theme_get()` to get the current **bayesplot** theme and |
| 72 | +#' `bayesplot_theme_set()` to set a new theme. `bayesplot_theme_update()` and |
| 73 | +#' `bayesplot_theme_replace()` are shorthands for changing individual elements. |
77 | 74 | #'
|
78 |
| -#' @details \code{bayesplot_theme_set} and friends only apply to |
79 |
| -#' \code{bayesplots}. However, \code{ggplot2::theme_set} can also be used to |
80 |
| -#' change the \pkg{bayesplot} theme. Currently, setting a theme with |
81 |
| -#' \code{ggplot2::theme_set} (other than the \pkg{ggplot2} default |
82 |
| -#' \code{\link[ggplot2]{theme_grey}}) will override the \pkg{bayesplot} theme. |
| 75 | +#' @details `bayesplot_theme_set()` and friends only apply to `bayesplots`. |
| 76 | +#' However, [ggplot2::theme_set()] can also be used to change the |
| 77 | +#' **bayesplot** theme. Currently, setting a theme with `ggplot2::theme_set()` |
| 78 | +#' (other than the **ggplot2** default [ggplot2::theme_grey()]) will override |
| 79 | +#' the **bayesplot** theme. |
83 | 80 | #'
|
84 | 81 | #' @export
|
85 | 82 | #' @param new The new theme (list of theme elements) to use. This is analogous
|
86 |
| -#' to the \code{new} argument to \code{\link[ggplot2]{theme_set}}. |
| 83 | +#' to the `new` argument to [ggplot2::theme_set()]. |
87 | 84 | #' @param ... A named list of theme settings.
|
88 | 85 | #'
|
89 |
| -#' @return \code{bayesplot_theme_get} returns the current theme. The other three |
90 |
| -#' functions (set, update, replace) invisibly return the \emph{previous} theme |
| 86 | +#' @return `bayesplot_theme_get()` returns the current theme. The other three |
| 87 | +#' functions (set, update, replace) invisibly return the *previous* theme |
91 | 88 | #' so it can be saved and easily restored later. This is the same behavior as
|
92 |
| -#' the \pkg{ggplot2} versions of these functions. |
| 89 | +#' the **ggplot2** versions of these functions. |
93 | 90 | #'
|
94 |
| -#' @seealso \code{\link{theme_default}} for the default \pkg{bayesplot} theme. |
| 91 | +#' @seealso [theme_default()] for the default **bayesplot** theme. |
95 | 92 | #' @template seealso-helpers
|
96 | 93 | #' @template seealso-colors
|
97 | 94 | #'
|
|
0 commit comments