[R] 10 superscript x lables in log-plot
Thomas Hoffmann
thomas.hoffmann at uni-bonn.de
Tue Jun 6 09:17:11 CEST 2006
Hi ListMembers,
I created a log plot with
nums = c(1:10, seq(20,100, 10), seq(200,1000, 100),
seq(2000,10000, 1000), seq(20000,100000, 10000),200000)
labl = rep("", length(nums))
labl[1] = "1"; labl[10] = "10"; labl[19] = "100";
labl[28] = "1.000"; labl[37] = "10.000"; labl[46] = "100.000"
plot(thickness_cm~area_km2, data=dat,
log="x",
xlab=c("catchment area [km²]"), xaxt="n", xlim=c(4,150000),
ylab=c("thickness [cm]"),ylim=c(0,1000))
axis(1, at = nums, label = labl, las = 2)
however I would like to use lables of the form 10 superscript 5.
Therefore I tried for example
labl[37]=expression(10^5)
which results in some error messages. Does anybody knows how to solve
the problem?
Thanks in advance
Thomas
More information about the R-help
mailing list