violin_plot
plot distribution of numeric y over categorical x
violin_plot(df, xvar, yvar, orderx = F, labx = NULL, laby = NULL, ...)
a dataframe, include columns xvar and yvar
unquoted variable for colmun name for x axis, should be categorical
unquoted variable for column name for y axis, should be numeric
string for x axis title, default is xvar.
string for y axis title, default is yvar
logical, default is FALSE, if TRUE, order the x axis based on y.
a ggplot with violin plot
violin_plot(mtcars,cyl,mpg,orderx=T)
violin_plot(mtcars,cyl,mpg,labx="Number of cylinders",laby="Miles/gallon")