在Matlab中创建多个具有相同比例的箱形图 [英] Creating several boxplots with the same scale in Matlab

查看:131
本文介绍了在Matlab中创建多个具有相同比例的箱形图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Matlab中绘制几个不同的箱线图,但要给它们相同的比例,以免读者被并排比较而被误导.

I'd like to plot several distinct boxplot in Matlab, but give them the same scale so that readers do not get misled by comparing them side by side.

我尝试使用datalim选项,但它仅对箱线图施加了上限,但如果数据未达到该上限,则不会对其进行拉伸.

I've tried using the datalim option, but it only imposes an upper limit to the boxplot, but does not stretch it if the data doesn't reach it.

有什么想法吗?

推荐答案

尝试使用linkaxes().这样可以为他们提供相同的比例,并在用户缩放或其他更改比例时保持同步.

Try linkaxes(). That will give them the same scale, and keep them synchronized if the user zooms or something else changes the scale.

这篇关于在Matlab中创建多个具有相同比例的箱形图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆