gpt4 book ai didi

r - 向图表添加垂直线

转载 作者:行者123 更新时间:2023-12-02 06:55:18 26 4
gpt4 key购买 nike

我想在我的时间序列图顶部以均匀的间隔添加垂直点/虚线。

我会在 abline 参数中添加一个额外的命令还是有其他方法?

最佳答案

使用grid :

nx, ny - number of cells of the grid in x and y direction. When NULL, as per default, the grid aligns with the tick marks on the corresponding default axis (i.e., tickmarks as computed by axTicks). When NA, no grid lines are drawn in the corresponding direction.

例子:

plot(1:5)
grid(nx = NULL, ny = NA)

enter image description here

关于r - 向图表添加垂直线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32689598/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com