R Data Visualization Recipes
上QQ阅读APP看书,第一时间看更新

Crafting simple violin plots

To visualize data and its distribution format, violin plots may be the way to go. Some data scientists love them, others hate. Still they play a role of major importance in data visualization and it's good to know how to brew them and the whole utility belt that comes along. There are alternatives though, as we are going to discuss later.

Again, until first half of 2017, both ggvis and plotly R's libraries does not dispose of a dedicated functions and types to draw violin plots, thus making relatively difficult to obtain such a viz using those packages. ggplot2 has a fully dedicated function, geom_violin(). Current recipe is teaching how to use this function. Make sure to have car package installed.