How to Turn off “missing values have been dropped” warning message in ggplot2

In this post, we will learn how to turn off the “missing values” warning message from ggplot2, when making a scatterplot with data containing missing values. geom_point() in ggplot2 gives a warning when it drops missing values from from the dataset it is plotting. Here is example of the warning when geom_point() drops 2 data… Continue reading How to Turn off “missing values have been dropped” warning message in ggplot2

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

Four geoms in ggplot2 to visualize uncertainty

Visualizing uncertainty with geom_pointange()

In this post, we will learn about four geoms in ggplot2 that are useful for revealing uncertainty in numerical variables with multiple categories. The four geoms, geom_errorbar(), geom_linerange(), geom_crossbar(), and geom_pointrange() are useful when we have categeorical x values and we are interested in the “distribution of y conditional on x and use the aesthetics… Continue reading Four geoms in ggplot2 to visualize uncertainty

Exit mobile version