nested_loop_base_plot | R Documentation |
Builds basic nested loop plots from output of nested_loop_base_data
.
This function is more flexible than the functionality offered by
nested_loop_plot
regarding drawing the basis of a facetted
nested loop plot. Usually only interesting to advanced users.
Most parameter definitions are the same as in nested_loop_plot
.
nested_loop_base_plot(
plot_data,
grid_scales = "fixed",
y_name = waiver(),
x_name = waiver(),
legend_name = "Method",
legend_breaks = waiver(),
legend_labels = NULL,
labeller = label_both_custom,
draw = list(add_points = list(alpha = 1), add_lines = list(size = 0.5, alpha = 1)),
connect_spus = FALSE,
colors = NULL,
shapes = 19,
linetypes = 1,
sizes = 1,
x_labels = waiver(),
ylim = NULL,
y_breaks = waiver(),
y_labels = waiver(),
na_rm = TRUE,
base_size = 12
)
plot_data |
Output list from |
grid_scales |
Analogous to |
y_name |
Character which is used as y-axis label. |
x_name |
Character which is used as x-axis label. |
legend_name |
String which is used as legend name. |
legend_breaks |
A character vector of breaks for the scales. Can be used to e.g. exclude
certain methods from the legend. If NULL, then no breaks are displayed in the
legend. Otherwise, must be the same length as |
legend_labels |
NULL or character vector which is used as keys in legend. Overrides variable
columns names in resdf. Must be the same length as |
labeller |
Labeller function to format strip labels of the facet grid. By default
uses a custom version of |
draw |
Named list of lists. Each entry specifies as its name a wrapper function
(one of |
connect_spus |
Logical - if TRUE, individual spus are connected by lines, this is necessary to reproduce original nested loop plots as suggested in the manuscript by Ruecker and Schwarzer (2014). The default FALSE means not to connect indidivual spus which often makes it easier to spot patterns in the results. |
colors |
NULL, vector of color specification of length equal to the number of
measurement columns (M) in |
shapes |
Single numeric or numeric vector, specifies custom shape scale for points
added to the plot. Cycled as necessary. Corresponds to the
|
linetypes |
Single numeric or numeric vector, specifies custom linetypes scale for lines
added to the plot. Cycled as necessary. Corresponds to the
|
sizes |
Single numeric or numeric vector, specifies custom sizes for lines and
points added to the plot. Cycled as necessary. Note that this scale affects
both points and lines due to the implementation in the underlying
ggplot2 package. Corresponds to the |
x_labels |
If set to NULL, no labels are drawn on x-axis. |
ylim |
Vector of length 2 with limits of y-axis for the measurement data. Steps
drawn (due to |
y_breaks |
Vector with user specified breaks of the y-axis. Default is to use the breaks as suggested by ggplot2. |
y_labels |
Vector with user specified labels of the y-axis. Default is to use the labels as suggested by ggplot2. |
na_rm |
Logical. Should missing values be removed before plotting? This means that lines will be connected, even if a missing value is between two values. |
base_size |
Numeric. base_size parameter of |
A ggplot2 object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.