plot_scatter {daltoolbox} | R Documentation |
Scatter graph
Description
This function creates a scatter plot using ggplot2.
Usage
plot_scatter(data, label_x = "", label_y = "", colors = NULL)
Arguments
data |
data.frame contain x, value, and variable |
label_x |
x-axis label |
label_y |
y-axis label |
colors |
color vector |
Value
return a ggplot2::ggplot graphic
Examples
grf <- plot_scatter(iris |> dplyr::select(x = Sepal.Length,
value = Sepal.Width, variable = Species),
label_x = "Sepal.Length", label_y = "Sepal.Width",
colors=c("red", "green", "blue"))
plot(grf)
[Package daltoolbox version 1.2.727 Index]