Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating several boxplots with the same scale in Matlab

Tags:

matlab

boxplot

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?

like image 923
Kena Avatar asked Feb 16 '11 15:02

Kena


People also ask

How do you make multiple boxplots in Matlab?

Plot multiple boxplots with matrix input. One boxplot will be created per column. To horizontally offset the boxplots to start at x = n, pad n-1 columns of NaN values to the start of the matrix. Plot multiple boxplots with a vector and a grouping variable.

How do you plot multiple box plots?

In this article, we will learn how to plot multiple boxplot in one graph in R Programming Language. This can be accomplished by using boxplot() function, and we can also pass in a list, data frame or multiple vectors to it. For this purpose, we need to put name of data into boxplot() function as input.

Are boxplots good for multiple groups?

Compare multiple groupsBox plots are at their best when a comparison in distributions needs to be performed between groups. They are compact in their summarization of data, and it is easy to compare groups through the box and whisker markings' positions.


1 Answers

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

like image 80
Andrew Janke Avatar answered Sep 20 '22 02:09

Andrew Janke