r - R 图中的网格

标签 r plot

是否有命令可以轻松地将网格添加到 R 图上?

最佳答案

grid命令似乎可以在任何需要的地方绘制网格线。我通常使用 abline 将线条精确地放置在我想要的位置。例如,

abline(v=(seq(0,100,25)), col="lightgray", lty="dotted")
abline(h=(seq(0,100,25)), col="lightgray", lty="dotted")

祝你好运!

关于r - R 图中的网格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1963492/

相关文章:

r - 如何 : Automatically set fixed coordinate ratio (coord_fixed) when x- and y-axis are on different scales?

python - 提高在 matplotlib 中重绘等高线图的速度

c++ - 在Qt中制作情节

r - 如何将度数(列)转换为弧度

r - 在对象中存储自定义 ggplot 样式

r - 如何在ggplot中绘制堆积和分组的条形图?

在R中的图例中删除符号中的线

r - 使用 par(mfrow=c(x,y)) 生成的图的每个面板上的标题键

r - 由于不需要的因素而更改代码

r - 具有大量数据的热图