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

How To Make PCA Plot with R

PCA plot: PC1 vs PC2

Principal Component Analysis (PCA) is one of the commonly used methods used for unsupervised learning. Making plots using the results from PCA is one of the best ways understand the PCA results. Earlier, we saw how to make Scree plot that shows the percent of variation explained by each Principal Component. In this post we… Continue reading How To Make PCA Plot with R

Sinaplot vs Violin plot: Why Sinaplot is better than Violinplot

Sinaplot and Violinplot

In this post, we will learn how to make Sinaplot in R and show why it is a better way visualize numerical data from multiple categories. In an earlier post, we discussed the benefits of making Violinplot than making a boxplot. This is mainly due to the fact that Boxplot relies only five summary stats… Continue reading Sinaplot vs Violin plot: Why Sinaplot is better than Violinplot

Exit mobile version