Effacer les filtres
Effacer les filtres

Box-Whisker Plot with 5 and 95 percentiles and non-symmetric distributions.

6 vues (au cours des 30 derniers jours)
Edoardo Briganti
Edoardo Briganti le 11 Août 2020
Modifié(e) : Edoardo Briganti le 12 Août 2020
Dear all,
I have a 1000x2 matrix, M, where each column represents the data of two variables. I would like to plot a boxplot of the two distributions of the data, by specifying the length of the whiskers:
boxplot(M,'Whisker',w)
However, I would like the upper and lower whiskers to represent the 5th and 95th percentiles respectively. In doing so, I have two problems:
  1. Both the distributions are highly non-symmetric, therefore, the suggestion provided here does not work, since the multiplier w is not the same for the upper and lower whiskers.
  2. Apparently, w can only takes on a scalar value, therefore, I cannot specify different multipliers for different distributions. Is there a way around this problem. In a follow up question of the same Q&A they suggest to use hold on, however the output is not good because of the overlapping of the figures.
It would be great if w could take the form of a 2xsize(M,2) array, in order to specify a specific multiplier for each distribution and for both the upper and lower whisker separately. However, I was not capable of editing in this way the original "boxplot" function.
Thanks in advance,
Edoardo

Réponses (0)

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by