Share the Gallery !Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

#148_basic_pirate_plot2Common R boxplots are widely used for data visualization. However, they have important drawbacks, hiding the distribution of data. The pirate plot has been developped by Nathaniel Philips and is available trough the yarrr package. First we need to install the package, available on github. The “pirates” dataset is provided with the package, we will use it for the charts.

Let’s do a first pirate plot with default features.

#148_basic_pirate_plot

The function works pretty much like the boxplot function. As for boxplot, we can put several factors in the formula, to group boxes:

#148_basic_pirate_plot2The pirate plot propose 3 themes. Theme 1 emphasises the bar with light points and beans. Theme 2 emphasises the points and beans. Theme 3 Emphases the 95% Highest Density Intervals (HDIs).

#149pirate_plot_with_theme1 #149pirate_plot_with_theme2 #149pirate_plot_with_theme3

You can also custom every elements of the plot. Several colors palette are proposed. To visualize every palettes, type.

Let’s do a custom pirate plot:

#150_custom_pirate_plot


Not what you are looking for ? Make a new search !


Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz