How can I adjust boxchart to have different number of groups for different nr of classes?
Afficher commentaires plus anciens
I would like to change this graph by keeping 4 boxplots for 4 and 6 classes, and then having only blue and red boxplots for 8 classes.2 commentaires
the cyclist
le 12 Sep 2024
There are a couple different possible approaches here.
One approach would be on the data side, which would be to replace the 8-classes yellow and purple data points with NaN values (or delete them), so that they don't "exist" to be plotted.
A second approach would be on the plotting side, which would be to identify those two boxes, and set their "Visible" property to "Off". (I am not 100% certain one can do this for individual boxes.)
Either way, if you upload the data and code you used to produce the plot, it will be easier to provide a solution.
Marietta
le 13 Sep 2024
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Labels and Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

