Description Usage Arguments Value Examples
View source: R/prepare_scatter_plot.R
Reads a data frame and prepares a scatter plot.
1 2 3 4 5 6 7 8 9 |
df |
Data frame containing the data |
x |
a string containing the column name of the x variable |
y |
a string containing the column name of the y variable |
color |
a string containing the column name of the variable providing the color aesthetic (can be numerical or a factor) |
size |
a string containing the column name of the variable providing the size aesthetic |
loess |
a numerical scalar
|
alpha |
The alpha value to be used. If missing, it calculates a default based on the sample size |
the plot as returned by ggplot
1 2 3 | df <- data.frame(year = floor(stats::time(datasets::EuStockMarkets)),
datasets::EuStockMarkets[, c("DAX", "FTSE")])
prepare_scatter_plot(df, x="DAX", y="FTSE", color="year")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.