Press "Enter" to skip to content

Adding Superscripts and Subscripts to Axis Labels in R

Steven Sanderson changes the script:

Before we dive into the code, let’s quickly review what superscripts and subscripts are.

  • Superscripts: These are smaller-sized characters or numbers that appear above the baseline of the text. They are often used to denote exponents or indices.
  • Subscripts: On the other hand, subscripts are smaller-sized characters or numbers that appear below the baseline of the text. They are commonly used in mathematical expressions or chemical formulas.

Read on to see how you can generate these in R visuals.