R - 删除刻度线而不删除标签

时间:2014-06-23 21:50:52

标签: r plot

我想从R中的绘图中删除刻度线,但不删除与各个刻度线相关联的文本。我该怎么做?

我的代码如下:

boxplot(boxDat ~ class, ylab = "Predictive Scoring", names = c("ANN", "Random\nForest", "Logistic\nRegression"), cex.axis=1, xaxt='n')

1 个答案:

答案 0 :(得分:9)

也许是这样的:

boxplot(count ~ spray, data = InsectSprays, col = "lightgray",xaxt = "n")
axis(side = 1,at = 1:6,letters[1:6],tick = FALSE)