This document provides some tips for plotting commonly required in hydrology and other scientific plots.

First, create some data and a simple plot, with an axis label that has a superscript:

year = seq(1980,1990)
irrig.area = seq(1,11)
ylab.text = expression(paste("Irrig area, km"^"2"))
plot(year,irrig.area,xlab="Year",ylab=ylab.text)

Note that the superscript is cut off. To avoid this, use “mtext” instead:

plot(year,irrig.area,xlab="Year",ylab="")
mtext(ylab.text,side=2, line =2.5)  # "line" sets where the text appears relative to the axis.

Axis label with embedded subscripts (not just at the end of the label):

ylab.text = expression('z'['0m']*', m')  # The asterisk brings back normal text
plot(year,irrig.area,xlab="Year",ylab="")
mtext(ylab.text,side=2, line =2.5)

Sequential superscripts:

ylab.text = expression('Mean annual Q,  m'^"3"*' s'^"-1")
plot(year,irrig.area,xlab="Year",ylab="")
mtext(ylab.text,side=2, line =2.5)