Description Usage Arguments Value Examples
Create a scatterplot using the magma color scheme
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
df |
A dataframe to use for the scatterplot. |
x |
Column-name of the numerical or categorical variable to be plotted on the x-axis |
y |
Column-name of the numerical or categorical variable to be plotted on the y-axis |
c |
Column-name of the categorical variable to color-code the data points Default value is blank for cases when there is no categorical column |
t |
Title of the plot. Default value is blank. If not provided, title will be computed based on x, y and/or c |
o |
Opacity of the data points. Number between 0.1 and 1.0 (inclusive) |
s |
Size of the data points. Number between 1 and 5 (inclusive) |
xtitle |
Title of the x-axis. Default value is blank. If not provided, title will be proper case of the x axis column |
ytitle |
Title of the x-axis. Default value is blank. If not provided, title will be proper case of the y axis column |
ctitle |
Title of the x-axis. Default value is blank. If not provided, title will be proper case of the color column |
xzero |
Scale the x-axis to start from 0 by specifying TRUE Default value is set to FALSE |
yzero |
Scale the x-axis to start from 0 by specifying TRUE Default value is set to FALSE |
shapes |
Assign the color column to the shape attribute of the plot if TRUE Default value is set to FALSE |
A ggplot object.
1 2 3 4 | penguins_data <- palmerpenguins::penguins
scatterplot(penguins_data, bill_length_mm, flipper_length_mm, species,
"Bill and Flipper length clusters by Species",
0.5, 2.5, "Bill length (mm)", "Flipper length (mm)", "", FALSE, FALSE, TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.