int_abline中的错误(a = a,b = b,h = h,v = v,untf = untf,...):在R中尚未调用plot.new

时间:2015-09-04 04:26:02

标签: r plot

这是我的代码段

parts <- c(2,4,2,5,3,5,5,2,4,3,4)
barplot(parts)
abline(h = mean(parts)) 

Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : 
plot.new has not been called yet

在得到这个错误后,我甚至尝试了plot.new(),它没有用。 barplot()工作正常,但它没有绘制abline图。可能是什么错误?

此致

0 个答案:

没有答案
相关问题