How to duplicate y-axis in ggplot2

Duplicate y-axis in ggplot2 with sec.axis()

In this tutorial, we will learn how to duplicate the primary axis in a plot made with ggplot2. We can duplicate either y-axis or x-axis using ggplot2’s sec.axis() function. Here we will first see an example of duplication y axis and then an example duplicating x-axis using sec.axis method. Let us load tidyverse. How to… Continue reading How to duplicate y-axis in ggplot2

Exit mobile version