有人可以解释为什么col=
参数对于情节与文字的行为不同,以及我如何使文字表现为情节?
这是一个有效的例子:
# Load Orange data from MASS library
library(MASS)
data(Orange)
# Plot data with colors
plot(Orange$circumference, col=Orange$Tree)
# (Works) Add labels without color
text(Orange$circumference, labels=Orange$Tree)
# (Fails) Add labels with color
text(Orange$circumference, labels=Orange$Tree, col=Orange$Tree)