Visualizing Missing Data with Barplot in R

Visualizing Missing Data with Barplot in R ggplot2

One of the common data exploring activities is to quickly have an understanding of the exten of missing data in a data set. There are a few quick ways to make a visualization of missing data. In this tutorial we will learn how to make stacked barplot with counts and proportion of missing data in… Continue reading Visualizing Missing Data with Barplot in R

How to Make Grouped Barplots with Same Bar Width

Grouped barplot allows to show third categorical variable in the barplot. Sometimes, when we make grouped barplot using ggplot2, some of the bars would have much broader width sizes. We typically get bars with uneven widths in a grouped barplot when some of the groups don’t have data for all of its levels. In this… Continue reading How to Make Grouped Barplots with Same Bar Width

How to Add Labels Directly in ggplot2. Hint: Use Secondary Axis Trick

Direct Labelling with Secondary Axis Trick

Legends can be of great help to understand a plot. Typically, ggplot2 adds legend by default on right side of the plot based on the variable that we used to color or fill. However, as Cluas Wilke says in his fantastic book on Data Visualization, legends can make the plot difficult to understand as well.… Continue reading How to Add Labels Directly in ggplot2. Hint: Use Secondary Axis Trick

How To Customize Border in facet in ggplot2

Remove Space Between Panels in Facet

ggplot2’s facet options are a great way make small multiples, i.e. multiple plots of the same type in a panel or grid. In this post, we will learn how to control the border line in a plot made with facet_wrap() function in ggplot2. First we will see how to remove the border lines in a… Continue reading How To Customize Border in facet in ggplot2

Exit mobile version