Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想绘制几个时间序列,每行显示 pch。但是,pch 出现在每个数据点上,有什么办法可以减少 pch 出现在线上的频率,比如每隔几个数据点出现一个 pch,这样线条就不会显示为填充 pch 的粗线?
这是一种可能对您有所帮助的方法。如果没有更多关于您希望输出的外观的详细信息,很难确定。
x = seq(0, 20, 0.1) par(mfrow=c(2, 1)) plot(x, x^2, pch=1, main="Before") points(x, x*10, pch=2) plot(x, x^2, pch=c(1, rep(NA, 9)), main="After") points(x, x*10, pch=c(2, rep(NA, 9)))