plot_scatter: Scatter graph

View source: R/graphics.R

plot_scatterR 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 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)

daltoolbox documentation built on Nov. 3, 2024, 9:06 a.m.