|
26 | 26 | #' )
|
27 | 27 | #'
|
28 | 28 | #' # Are equivalent to these less verbose theme settings
|
29 |
| -#' p + theme_axis_bottom( |
| 29 | +#' p + theme_sub_axis_bottom( |
30 | 30 | #' title = red_text,
|
31 | 31 | #' text = red_text,
|
32 | 32 | #' line = red_line,
|
@@ -54,85 +54,85 @@ subtheme <- function(elements, prefix = "", suffix = "", call = caller_env()) {
|
54 | 54 |
|
55 | 55 | #' @export
|
56 | 56 | #' @describeIn subtheme Theme specification for all axes.
|
57 |
| -theme_axis <- function(title, text, ticks, ticks.length, line) { |
| 57 | +theme_sub_axis <- function(title, text, ticks, ticks.length, line) { |
58 | 58 | subtheme(find_args(), "axis.")
|
59 | 59 | }
|
60 | 60 |
|
61 | 61 | #' @export
|
62 | 62 | #' @describeIn subtheme Theme specification for both x axes.
|
63 |
| -theme_axis_x <- function(title, text, ticks, ticks.length, line) { |
| 63 | +theme_sub_axis_x <- function(title, text, ticks, ticks.length, line) { |
64 | 64 | subtheme(find_args(), "axis.", ".x")
|
65 | 65 | }
|
66 | 66 |
|
67 | 67 | #' @export
|
68 | 68 | #' @describeIn subtheme Theme specification for both y axes.
|
69 |
| -theme_axis_y <- function(title, text, ticks, ticks.length, line) { |
| 69 | +theme_sub_axis_y <- function(title, text, ticks, ticks.length, line) { |
70 | 70 | subtheme(find_args(), "axis.", ".y")
|
71 | 71 | }
|
72 | 72 |
|
73 | 73 | #' @export
|
74 | 74 | #' @describeIn subtheme Theme specification for the bottom x axis.
|
75 |
| -theme_axis_bottom <- function(title, text, ticks, ticks.length, line) { |
| 75 | +theme_sub_axis_bottom <- function(title, text, ticks, ticks.length, line) { |
76 | 76 | subtheme(find_args(), "axis.", ".x.bottom")
|
77 | 77 | }
|
78 | 78 |
|
79 | 79 | #' @export
|
80 | 80 | #' @describeIn subtheme Theme specification for the top x axis.
|
81 |
| -theme_axis_top <- function(title, text, ticks, ticks.length, line) { |
| 81 | +theme_sub_axis_top <- function(title, text, ticks, ticks.length, line) { |
82 | 82 | subtheme(find_args(), "axis.", ".x.top")
|
83 | 83 | }
|
84 | 84 |
|
85 | 85 | #' @export
|
86 | 86 | #' @describeIn subtheme Theme specification for the left y axis.
|
87 |
| -theme_axis_left <- function(title, text, ticks, ticks.length, line) { |
| 87 | +theme_sub_axis_left <- function(title, text, ticks, ticks.length, line) { |
88 | 88 | subtheme(find_args(), "axis.", ".y.left")
|
89 | 89 | }
|
90 | 90 |
|
91 | 91 | #' @export
|
92 | 92 | #' @describeIn subtheme Theme specification for the right y axis.
|
93 |
| -theme_axis_right <- function(title, text, ticks, ticks.length, line) { |
| 93 | +theme_sub_axis_right <- function(title, text, ticks, ticks.length, line) { |
94 | 94 | subtheme(find_args(), "axis.", ".y.right")
|
95 | 95 | }
|
96 | 96 |
|
97 | 97 | #' @export
|
98 | 98 | #' @describeIn subtheme Theme specification for the legend.
|
99 |
| -theme_legend <- function(background, margin, spacing, spacing.x, spacing.y, |
100 |
| - key, key.size, key.height, key.width, text, title, |
101 |
| - position, direction, justification, box, box.just, |
102 |
| - box.margin, box.background, box.spacing) { |
| 99 | +theme_sub_legend <- function(background, margin, spacing, spacing.x, spacing.y, |
| 100 | + key, key.size, key.height, key.width, text, title, |
| 101 | + position, direction, justification, box, box.just, |
| 102 | + box.margin, box.background, box.spacing) { |
103 | 103 | subtheme(find_args(), "legend.")
|
104 | 104 | }
|
105 | 105 |
|
106 | 106 | #' @export
|
107 | 107 | #' @describeIn subtheme Theme specification for the panels.
|
108 |
| -theme_panel <- function(background, border, spacing, spacing.x, spacing.y, |
109 |
| - grid, grid.major, grid.minor, grid.major.x, |
110 |
| - grid.major.y, grid.minor.x, grid.minor.y, ontop) { |
| 108 | +theme_sub_panel <- function(background, border, spacing, spacing.x, spacing.y, |
| 109 | + grid, grid.major, grid.minor, grid.major.x, |
| 110 | + grid.major.y, grid.minor.x, grid.minor.y, ontop) { |
111 | 111 | subtheme(find_args(), "panel.")
|
112 | 112 | }
|
113 | 113 |
|
114 | 114 | #' @export
|
115 | 115 | #' @describeIn subtheme Theme specification for the whole plot.
|
116 |
| -theme_plot <- function(background, title, title.position, subtitle, caption, |
117 |
| - caption.position, tag, tag.position, tag.location, |
118 |
| - margin) { |
| 116 | +theme_sub_plot <- function(background, title, title.position, subtitle, caption, |
| 117 | + caption.position, tag, tag.position, tag.location, |
| 118 | + margin) { |
119 | 119 | subtheme(find_args(), "plot.")
|
120 | 120 | }
|
121 | 121 |
|
122 | 122 | #' @export
|
123 | 123 | #' @describeIn subtheme Theme specification for facet strips.
|
124 |
| -theme_strip <- function(background, background.x, background.y, clip, |
125 |
| - placement, text, text.x, text.x.bottom, text.x.top, |
126 |
| - text.y, text.y.left, text.y.right, |
127 |
| - switch.pad.grid, switch.pad.wrap) { |
| 124 | +theme_sub_strip <- function(background, background.x, background.y, clip, |
| 125 | + placement, text, text.x, text.x.bottom, text.x.top, |
| 126 | + text.y, text.y.left, text.y.right, |
| 127 | + switch.pad.grid, switch.pad.wrap) { |
128 | 128 | subtheme(find_args(), "strip.")
|
129 | 129 | }
|
130 | 130 |
|
131 | 131 | subtheme_param_doc <- function() {
|
132 | 132 | funs <- list(
|
133 |
| - theme_axis, theme_axis_x, theme_axis_y, theme_axis_bottom, |
134 |
| - theme_axis_top, theme_axis_left, theme_axis_right, theme_legend, |
135 |
| - theme_panel, theme_plot, theme_strip |
| 133 | + theme_sub_axis, theme_sub_axis_x, theme_sub_axis_y, theme_sub_axis_bottom, |
| 134 | + theme_sub_axis_top, theme_sub_axis_left, theme_sub_axis_right, theme_sub_legend, |
| 135 | + theme_sub_panel, theme_sub_plot, theme_sub_strip |
136 | 136 | )
|
137 | 137 | args <- sort(unique(unlist(lapply(funs, fn_fmls_names), use.names = FALSE)))
|
138 | 138 | paste0(
|
|
0 commit comments