Barplot





Welcome to the barplot section of the R graph gallery. A barplot is used to display the relationship between a numeric and a categorical variable. This section also include stacked barplot and grouped barplot where two levels of grouping are shown.

Step by step - ggplot2 and geom_bar()

ggplot2 allows to build barplot thanks to the geom_bar() function. The examples below will guide you through the basics of this tool:



Basic R and the barplot() function

Basic R can build quality barplots thanks to the barplot() function. Here is a list of examples guiding you through the most common customization you will need.

Related chart types


Barplot
Spider / Radar
Wordcloud
Parallel
Lollipop
Circular Barplot