In this tutorial, we will learn how to wrap really long axis tick labels into multiple lines in R while making plots with ggplot2. A long axis text labels make harder to understand the plot and ofter it overlaps with the neighboring labels and obscuring the labels. Here we will … [Read more...] about How to wrap long axis tick labels into multiple lines in ggplot2
barplot ggplot2
How to add percentage label on bars in barplot with ggplot2
Adding percentage labels or count labels to bars in a barplot can help read the barplot quickly. In this tutorial, we will learn how to add labels with percentage symbol on bars in a barplot made with ggplot2 in R. Loading Packages and Dataset Let us get started by loading … [Read more...] about How to add percentage label on bars in barplot with ggplot2
How to Color Barplots with R Color Brewer
In this tutorial we will learn to how to color bars in a barplot using R Color Brewer's color palettes. R Color Brewer package "RColorBrewer" offers numerous color palettes that are useful in common situations. For example, it gives "Sequential" palette for ordered data, … [Read more...] about How to Color Barplots with R Color Brewer
How To Manually Specify Colors for Barplot in ggplot2?
One of the great things about making plots with ggplot2 is that it offers a number of ways to add colors to the plots. We can use ggplot2's default options for adding colors to plots. However, sometimes one might want to manually specify colors to a plot. There are a few ways to … [Read more...] about How To Manually Specify Colors for Barplot in ggplot2?
How To Highlight a Bar in Barplot in R?
Sometimes while making a barplot, you might like to highlight a single bar in different color when compared to other bars. In this post, we will learn how to highlight a bar in barplot using ggplot2 in R. A Barplot displays counts or some quantitative variable corresponding to … [Read more...] about How To Highlight a Bar in Barplot in R?