首页 > 其他分享 >R语言中axis 中调整标签与轴线的距离

R语言中axis 中调整标签与轴线的距离

时间:2023-01-07 21:33:07浏览次数:40  
标签:轴线 font seq 10 标签 padj axis cex

 

使用 padj参数调整垂直距离;

使用hadj参数调整水平距离; 

 

001、padj参数

par(mfrow = c(2,1))
plot(1:10, cex = 2, pch = 17, xaxt ="n", xlab = "", main = "0.5")
axis(1, at=seq(0, 10, 5), cex.axis=2,font = 2, line = 1, col.axis  = "red", padj = 0.2) 

plot(1:10, cex = 2, pch = 17, xaxt ="n", xlab = "", main = "1")
axis(1, at=seq(0, 10, 5), cex.axis=2,font = 2, line = 1, col.axis  = "blue", padj = 1)

 

 

002、hadj参数

par(mfrow = c(2,1))
plot(1:10, cex = 2, pch = 17, xaxt ="n", xlab = "", main = "0.5")
axis(1, at=seq(0, 10, 5), cex.axis=2,font = 2, line = 1, col.axis  = "red", hadj = 0.5) 

plot(1:10, cex = 2, pch = 17, xaxt ="n", xlab = "", main = "1")
axis(1, at=seq(0, 10, 5), cex.axis=2,font = 2, line = 1, col.axis  = "blue", hadj = 1)

 

标签:轴线,font,seq,10,标签,padj,axis,cex
From: https://www.cnblogs.com/liujiaxin2018/p/17033602.html

相关文章