Description Usage Arguments Details Value Examples
View source: R/nplots_violin.R
This function takes your plot arguments like the data, aesthetics, plot layers and labels and creates a violin 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 3 |
x |
The dataset to be used |
y_variable |
y-axis variable for the violin plot |
factor |
the factor variable to be used in the violin plot |
jitter |
argument to specify whether jitter should be included in plot - supply arguments TRUE of FALSE |
order |
argument to specify whether factor reorder should be applied to a plot - supply arguments TRUE of FALSE |
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 violin plot using - nplots_violin
with the background machinery being ggplot2. Future versions of this function will provide an inclusion of other plot layers and objects to work with.
violin plot
1 2 | \code {nplots_violin(gapminder, gapminder$gdpPercap, gapminder$continent, jitter=TRUE, order=TRUE, xlab="Continent", ylab="gdpPercap", title="gdpPercap across continents", plotly=TRUE, alpha=0.05, hjust=0.5)}
\code {nplots_violin(iris, iris$Sepal.Width, iris$Species, jitter=FALSE, order=TRUE, 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.