In this tutorial, we will learn how to move the strip label title text in ggplot2's facet* functions to the bottom. By default, facet_wrap() creates a box for each strip with a label at the top of the small multiple plot. In this post, we will show how to move the strip label to … [Read more...] about How to Move Facet strip label to the bottom
4 Ways to have Plots Side by side in ggplot2
In this post, we will learn how to combine two plots side-by-side using four different approaches. First, we will show how we can use facet_wrap() function in ggplot2, if we are interested in similar plots (small multiples) side by side. Next three approaches are more general, … [Read more...] about 4 Ways to have Plots Side by side in ggplot2
How to add text annotation to heatmap with ggplot2
In this post, we will see how can we add text annotation to heatmaps made with ggplot2. In ggplot2, we can make simple heatmaps using ggplot2's geom_raster() and geom_tile(). In this post, we will use geom_text() to add text annotation, i.e. numerical values in the heatmap. We … [Read more...] about How to add text annotation to heatmap with ggplot2
How to directly add labels on a plot with ggrepel
In this tutorial, we will learn how to add legends to a plot made with ggplot2 directly on the plot, so that it is much easier to understand the plot. When you make a plot with ggplot, adding legends to explain the plot is of great help to understand a plot. By default, ggplot2 … [Read more...] about How to directly add labels on a plot with ggrepel
3 Different ways to make bar plots with ggplot2
In this post, we will see three different ways to make a barplot with count on y-axis in ggplot2. We will show how to make bar plot using geom_bar(), stat_count(), and geom_col() functions available in ggplot2 Bar plot with geom_bar() Bar plot with … [Read more...] about 3 Different ways to make bar plots with ggplot2