如何将垂直轴和水平轴上的网格线添加到箱线图中这是一个简单的示例
load carsmall
boxplot(MPG, Origin, 'medianstyle', 'target')
grid on;
这只允许水平放置线条。我也需要一些东西来分离水平轴谢谢!
使用factorseparator
手柄:
boxplot(MPG, Origin, 'medianstyle', 'target','factorseparator',1)
仅供参考,如果您在箱线图文档页面http://www.mathworks.com/help/stats/boxplot.html中搜索“网格”一词,您就会知道。想象一下,如果您开始阅读文档页面,您还能发现什么!