In this tutorial, we will learn how to add circles/triangles around a select data points in a scatter plot made with ggplot2 in R. Adding circles/triangles around data points is yet another way to add annotation to data points to highlight them to attract attention to the region … [Read more...] about How To Add Circles Around Specific Data Points in R
R
How To Annotate Clusters with Circle/Ellipse by a Variable in R
In this tutorial, we will learn how to annotate a plot by circle or ellipse based on a categorical variable in the data. We will use ggforce package's geom_mark_circle() and geom_mark_ellipse() functions to annotate with circles and ellipse. Unlike geom_circle() function to … [Read more...] about How To Annotate Clusters with Circle/Ellipse by a Variable in R
How To Annotate a Plot with Circle in R
In this tutorial, we will learn how to annotate a plot with circle to highlight a select portion of a plot made with ggplot2 in R. There are a few options to add a circle on top of a plot with ggplot2. In this example, we will annotate a plot with a circle at a specific location … [Read more...] about How To Annotate a Plot with Circle in R
Visualizing Missing Data with Barplot in R
One of the common data exploring activities is to quickly have an understanding of the exten of missing data in a data set. There are a few quick ways to make a visualization of missing data. In this tutorial we will learn how to make stacked barplot with counts and proportion of … [Read more...] about Visualizing Missing Data with Barplot in R
How to Add Labels Directly in ggplot2. Hint: Use 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 … [Read more...] about How to Add Labels Directly in ggplot2. Hint: Use Secondary Axis Trick