Convenient wrapper around a variety of scatterplot functionalities. See details for more.
plotScatterplot(
object,
variable_x,
variable_y,
phase = NULL,
across = NULL,
across_subset = NULL,
relevel = TRUE,
ncol = NULL,
nrow = NULL,
color_aes = NULL,
color_by = NULL,
scales = "fixed",
space = "fixed",
pt_alpha = 0.9,
pt_clr = NULL,
pt_clrp = NULL,
pt_fill = NULL,
pt_shape = NULL,
pt_size = NULL,
display_smooth = FALSE,
smooth_alpha = NULL,
smooth_clr = NULL,
smooth_method = NULL,
smooth_se = NULL,
smooth_size = NULL,
display_corr = FALSE,
corr_method = "pearson",
corr_pmin = 5e-05,
corr_pos_x = NULL,
corr_pos_y = NULL,
corr_text_sep = "\n",
corr_text_size = 1,
...
)
object | A valid cypro object. |
---|---|
variable_x, variable_y | Character values. The numeric variables to be plotted on the x-axis and
y-axis. Use |
phase | Character or numeric. If character, the ordinal value referring to the phase of interest (e.g. 'first', 'second' etc.). referring to the phase of interest or 'all'. If numeric, the number referring to the phase. If set to NULL takes the phase denoted as default with Ignored if the experiment design contains only one phase. |
across | Character value, character vector or NULL (see details for more). Specifies the grouping variable of interest. Use |
across_subset | Character vector or NULL. Specifies the particular groups
of interest the grouping variable specified in argument If set to NULL all of them are chosen. You can prefix groups you are NOT interested in with a '-'. (Saves writing if there are more groups you are interested in than groups you are not interested in.) Use |
relevel | Logical value. If set to TRUE the input order of |
ncol | Given to |
nrow | Given to |
scales | Given to |
space | Given to |
pt_alpha | Numeric value. Specifies the degree of transparency of all points. |
pt_clr | Character value. Specifies the color of all points. |
pt_clrp | The color palette to be used if the specified variable displayed by
color is categorical/discrete. Run |
pt_size | Numeric value. Specifies the size of all points. |
display_smooth | Logical value. If set to TRUE a smoothed line is displayed to emphasize
the overall trend of the data. Use the |
smooth_clr | Character value. Denotes the color of the smoothed line. |
smooth_method | Character value. Denotes the model type used to display the line. Defaults to
'lm' (linear model). Given to argument |
smooth_se | Logical. If set to TRUE the standard error will be displayed. |
smooth_size | Numeric value. Denotes the size of the smoothed line. |
display_corr | Logical value. If set to TRUE the correlation of the x- and y-variable is calculated
and displayed on the plot (or each subplot if |
corr_method | Character value. Denotes the method with which to compute the correlation values if
|
corr_pmin | Numeric value. The minimum p-value that is displayed as a number. Everything below it is
displayed as < |
corr_pos_x, corr_pos_y | Numeric values or NULL. Specify the exact position of the text used to display the correlation results. If set to NULL defaults to left upper corner of the plot. |
corr_text_sep | Character value. The string that separates correlation value and respective p-value. |
corr_text_size | Numeric value. The size used to print the correlation results. |
A ggplot.
Argument across
can be specified as a character vector of length 2. If so, argument
across_subset
must be a list of character vectors whereby the names of the list correspond to the input for across
.