how to create xticklabels with a fixed width

1 Ansicht (letzte 30 Tage)
Ean Hendrickson
Ean Hendrickson am 15 Jan. 2020
Is it possible to create xticklabels that wraps the text when it gets to long to a new line. I have a program that creates a bar graphs based on existing data. The number of bars on the graph changes anywhere from 1 to 10. On the xticklabels I want to have a description of each bar that goes to a new line as to not interfere with any other text.
I am aware of https://www.mathworks.com/matlabcentral/answers/218675-is-it-possible-to-create-textbox-with-fixed-width-on-a-plot this method, but that just creates an annotation not an xticklabel. Is it possible to use 'FitBoxToText' when using xtixklabels.
an example set of data I would have would be a 4x3 matrix that contains the quantity, a part number and a description
Screen Shot 2020-01-14 at 9.18.44 PM.png
Then the output graph would look like
Screen Shot 2020-01-14 at 9.18.12 PM.png

Antworten (0)

Kategorien

Mehr zu Labels and Annotations finden Sie in Help Center und File Exchange

Produkte


Version

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by