Description Usage Arguments Details Value Examples
View source: R/nplots_scatter.R
This function takes your plot arguments like the data, aesthetics, plot labels, desired layers and creates a scatter plot for you using ggplot2. You don't have to worry about writing a bunch of lines of code. This function takes care ofthat for you!
1 2 | nplots_scatter(x, x_variable, y_variable, xlab = "", ylab = "",
title = "", plotly = TRUE, alpha = 0.2, hjust = 0.5)
|
x |
The dataset to be used |
x_variable |
x-axis variable for the scatter plot |
y_variable |
y-axis variable for thescatter plot |
xlab |
argument to specify x axis label |
ylab |
argument to specify y axis label |
title |
argument to specify the plot title to be applied |
plotly |
argument to specify whether the genereated plot should be rendered as a plotly plot |
alpha |
argument to specify geom_poin opacity or transparency magnitude |
hjust |
argument to specify horizontal justification of the plot title |
This function takes plot the specified plot arguments and produces a scatter plot using - nplots_scatter
with the background machinery being ggplot2. Future versions of this function will provide an inclusion of other plot layers and objects to work with.
scatter plot
1 2 | \code {nplots_scatter(gapminder, gapminder$lifeExp, gapminder$gdpPercap, xlab="lifeExp", ylab="gdpPercap", title="lifeExp Vs GdpPercap", plotly=FALSE)}
\code {nplots_scatter(iris, iris$Sepal.Width, iris$Sepal.Length, xlab="Sepal.Width", ylab="Sepal.Length", title="Sepal Width Vs Length", plotly=FALSE)}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.