Skip to contents

Creates a simple scatterplot using the colours selected from the image, plotting two features from a dataset of the users choosing.

Usage

scatterplot(img_url, dataset, x, y, colour)

Arguments

img_url

URL of an image file

dataset

data.frame or tibble

x

unquoted column name to plot on the x-axis from data data.frame or tibble

y

unquoted column name to plot on the y-axis from data data.frame or tibble

colour

unquoted column name to plot as the colour from data data.frame or tibble

Value

A geom_point ggplot

Examples

scatterplot('https://i.imgur.com/s9egWBB.jpg',
palmerpenguins::penguins,
bill_length_mm, body_mass_g, species)