【发布时间】:2014-03-08 01:44:22
【问题描述】:
我的条形图中有几种碳化合物,但我需要为每个碳化合物下标,例如C*12*-C*16*, C*17*-C*25*,C*26*-C*32*,C*33*-C*37*.
我正在尝试使用表达式函数,但它与 barplot 上的 names.arg 函数不兼容。请看目前为止的代码:
barplot(t(as.matrix(alkane)),
ylim=c(0,100),
names.arg=c("C12-C16","C17-C25","C26-C32","C33-C37"),
xlab="Hydrocarbons analysed after 21 days",
ylab="% loss in concentration relative to day 0",
cex.lab=0.8,
cex.axis=0.8,
cex.names=0.8,
cex.main=0.8,
beside=TRUE,
col=c("blue","red"))
任何帮助将不胜感激。
【问题讨论】:
标签: r expression plotmath