Customize tick values in boxplot
105 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lukas Netzer
am 5 Mai 2021
Kommentiert: Adam Danz
am 6 Mai 2021
Hey,
I have the following boxplot:
Instead of 1, 2, 3 on the x-axis I want to have 50kW, 150kW, 300kW - I tried changing tick-values to either only 50, 150, 300 or with kW. Both wont work, as obviously these are not regular tick values. Is there a way to customize it, to have it display what I need?
0 Kommentare
Akzeptierte Antwort
Adam Danz
am 5 Mai 2021
Bearbeitet: Adam Danz
am 5 Mai 2021
Use the Labels input option.
boxplot(rand(20,3),'Labels',compose('%dkW',[50,150,300]))
> I tried changing tick-values
You would need to change the xticklabel property.
set(gca, 'xtick',1:3,'XTickLabels',compose('%dkW',[50,150,300]))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Axis Labels finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!