Skip to content

Superscript followed by number then superscript in text

3 messages · Benjamin Gillespie, Thomas Lumley, Rui Barradas

#
Hi all,

I'm having problems finding the correct format for a command.

I would like to write some text on a plot.

I'm using the following command:

text(x,y,"text here", srt=90)

I would like the text to read:

capacity 10^3 m^3

(with ^ denoting superscript (i.e. each '3' as superscript).

I've tried fiddling around with expression(paste(etc.... to no avail. I receive errors such as: "Error: unexpected numeric constant..."

Anyone had experience with this before? Any suggestions would be great.

Many thanks in advance,
		
Ben Gillespie
Research Postgraduate
 
School of Geography
University of Leeds
Leeds
LS2 9JT
#
Hello,

Something like this?

plot(1, type = "n")
text(1,1, expression(capacity ~ 10^3 ~ m^3))


Hope this helps,

Rui Barradas

Em 18-03-2013 20:29, Benjamin Gillespie escreveu: