pch in R, short for plot characters, is symbols or shapes we can use for making plots. In R, there are 26 built in shapes available for use and they can be identified by numbers ranging from 0 to 25. The first 19 (0:18) numbers represent S-compatible vector symbols and the remaining 7 (19:25) represent… Continue reading pch in R : built-in shapes in R
Category: ggplot2
How To Add Circles Around Specific Data Points in R
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 of the plot. Let us load tidyverse… Continue reading How To Add Circles Around Specific Data Points in R
How to Annotate a Specific Cluster or Group in ggplot2
In this tutorial, we will learn how to annotate or highlight a specific cluster/group in R using ggplot2. We can use R package ggforce to annotate a select group as a circle or ellipse on a scatter plot. In this example, we will use geom_mark_ellipse() function to highlight a cluster on scatterplot. To annotate specific… Continue reading How to Annotate a Specific Cluster or Group in ggplot2
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 annotate a plot, geom_mark_* functions automatically computes the circle/ellipse radius to draw around… Continue reading 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… Continue reading How To Annotate a Plot with Circle in R