Creates a ggplot2 object using the parameters passed in.
ptd_create_ggplot(
x,
point_size = 4,
percentage_y_axis = FALSE,
main_title,
x_axis_label,
y_axis_label,
fixed_x_axis_multiple = TRUE,
fixed_y_axis_multiple = TRUE,
x_axis_date_format = "%d/%m/%y",
x_axis_breaks = NULL,
y_axis_breaks = NULL,
label_limits = FALSE,
icons_size = 8L,
icons_position = c("top right", "bottom right", "bottom left", "top left", "none"),
colours = ptd_spc_colours(),
theme_override = NULL,
break_lines = c("both", "limits", "process", "none"),
...
)
An object created by ptd_spc()
Specify the plotting point size for the ggplot2 output. The default is 2.5.
Specify whether the y axis values are percentages.
Accepted values are TRUE
for a percentage y axis, or FALSE
for an
integer y axis. Defaults to FALSE
.
Specify a character string value for the plot title.
Specify a character string value for the x axis title.
Specify a character string value for the y axis title.
Specify whether, if producing a faceted spc,
the x axis should be fixed for all facet plots. Accepted values are TRUE
for fixed x axes or FALSE
for individual x axes.
Specify whether, if producing a faceted spc,
the y axis should be fixed for all facet plots. Accepted values are TRUE
for fixed y axes or FALSE
for individual y axes.
Specify how dates on the x axis should be displayed. The format should be provided as a character string using 'd m Y' -type syntax.
Specify an interval value for breaks on the x axis. The value should be a character string expressing interval length and type, e.g. "3 months", "7 days".
Specify an interval value for breaks on the y axis. The value should be a numeric vector of length 1, either an integer for integer scales or a decimal value for percentage scales. This option is ignored if faceting is in use.
Whether to add a secondary y axis that just provides
labels for the values of the UCL, LCL and mean. The default is FALSE
.
The size of the icons, defined in terms of font size. Defaults to 8.
Where to show the icons, either "top right" (default), "bottom right", "bottom left", "top left", or "none".
Specify the colours to use in the plot. Use the
ptd_spc_colours()
function to change defaults.
Specify a list containing ggplot2 theme elements that can be used to override the default appearance of the plot.
Whether to break lines when a rebase happens. Defaults to "both", but can break just "limits" lines, "process" lines, or "none".
Currently ignored
A ggplot2 object