1

如何将垂直轴和水平轴上的网格线添加到箱线图中这是一个简单的示例

load carsmall

boxplot(MPG, Origin, 'medianstyle', 'target')

grid on;

这只允许水平放置线条。我也需要一些东西来分离水平轴谢谢!

4

1 回答 1

2

使用factorseparator手柄:

boxplot(MPG, Origin, 'medianstyle', 'target','factorseparator',1)

在此处输入图像描述

仅供参考,如果您在箱线图文档页面http://www.mathworks.com/help/stats/boxplot.html中搜索“网格”一词,您就会知道。想象一下,如果您开始阅读文档页面,您还能发现什么!

于 2014-09-17T00:25:48.280 回答