Description Usage Arguments Value Author(s)
Function returns a plot object of x/y scatter points where the x variable can possibly be a category/factor type variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | scatter_plot(
df,
aes_x,
aes_y,
title = NULL,
subtitle = NULL,
x_label = aes_x,
y_label = aes_y,
x_limits = c(0, 10, 1),
y_limits = c(0, 10, 1),
pts_color = "black",
pts_alpha = 1,
pts_size = 1,
factor_var = NULL,
factor_levels = NULL,
factor_colors = NULL,
factor_level_panels = FALSE,
n_rows = 1,
n_cols = length(factor_levels),
connect = NULL,
connect_color = "red"
)
|
df |
The target data frame from which the scatter points are plotted. |
aes_x |
A string that sets the x axis variable name from |
aes_y |
A string that sets the y axis variable name from |
title |
A string that sets the overall title. |
subtitle |
A string that sets the overall subtitle. |
x_label |
A string that sets the x axis title. |
y_label |
A string that sets the y axis title. |
x_limits |
A numeric vector that sets the minimum, maximum, and interval for the x axis. |
y_limits |
A numeric vector that sets the minimum, maximum, and interval for the y axis. |
pts_color |
A string that sets the color of the points. |
pts_alpha |
A numeric value that sets the alpha level of |
pts_size |
A numeric value that sets the size of the points. |
factor_var |
A string that sets the factor variable that has multiple levels from |
factor_levels |
A character vector that sets the levels to be plotted from |
factor_colors |
A character vector that sets the colors for each of the values in |
factor_level_panels |
A logical that if |
n_rows |
An integer that defines the number of panel rows if |
n_cols |
An integer that defines the number of panel columns if |
connect |
A string that sets the variable from |
connect_color |
A string that sets the color of the connect line. |
A plot object.
Rick Dean
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.