Creating several boxplots with the same scale in M

2019-06-17 08:23发布

问题:

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.

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.

Any ideas?

回答1:

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