How can I adjust boxchart to have different number of groups for different nr of classes?
Ältere Kommentare anzeigen
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 Kommentare
the cyclist
am 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
am 13 Sep. 2024
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Labels and Annotations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

