【发布时间】:2021-11-23 00:18:15
【问题描述】:
我试图在question 中重现 akrun 的回答中的情节:
#create data
a = abs(rnorm(100,10,10))
b = abs(rnorm(100,10,10))
i = 1
c = data.frame(a,b,i)
c$col = as.factor(ifelse(c$b>10,"red", "blue"))
#making plot
plot(c$a, type = "h", col = c$col, main = "plot_1, i = 1",
ylim = c(0, 100))
legend(1, 95, legend=c("Sampled", "Not Sampled"),
col=c("red", "black"), lty=1:2, cex=0.8)
我有什么(传说有另一种形式和参数):
可能是什么问题?
【问题讨论】:
-
无法重现您的问题;我正在使用类似于第一个的情节(Ubuntu 上的 R 4.1.0)
-
我无法重现该问题。它仍然给我与第一个相同的输出。也许检查你的
options()。我在 Mac 上使用 R 4.1.1 -
@desertnaut 我不知道,哪里有问题。但是当我复制(例如)Kabakoff 的书
Figure 3.10 An annotated comparison of Drug A and Drug Bp.62 中的情节时 - 我遇到了同样的问题。 -
@manro 你能在控制台上输入
par(),它会给出所有默认参数值。还要检查here -
@akrun np - 我做到了。更正了问题