How to Add Caption to a Plot in R

Customize Caption Text with element_text()

In this tutorial, we will learn how to add caption to a plot made with ggplot2 in R. Caption in R is a small text at the right corner of a plot that adds some value to the plot. We will use faithful eruption data available from built-in dataset in R. Simple plot with ggplot2… Continue reading How to Add Caption to a Plot in R

How to order boxes in boxplot with fct_reorder in R

Order Boxplot in R

In this tutorial, we will learn how to order boxes in boxplot made with ggplot2 in R. There are a few ways to order boxes in a boxplot. Earlier, we saw how to use base R’s reorder() function to order the boxes in boxplot based on the median values of another variable in the data.… Continue reading How to order boxes in boxplot with fct_reorder in R

How To Make tSNE plot in R

tSNE Plot

tSNE is dimensionality reduction technique suitable for visualizing high dimensional datasets. tSNE is an abbreviation of t-Distributed Stochastic Neighbor Embedding (t-SNE) and it was introduced by van der Maaten and Hinton. In this tutorial, we will learn how to perform tSNE in R without going into theoretical underpinnings of tSNE. Our main goal is to… Continue reading How To Make tSNE plot in R

pch in R : built-in shapes in R

pch options in R with ggplot2

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

How To Add Circles Around Specific Data Points in R

How to Add Circles and Triangles around Select Points in ggplot2

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

Exit mobile version