Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

XTickLabel Creation

Status
Not open for further replies.

HikariSpeed

Mechanical
Joined
Jan 10, 2003
Messages
3
Location
US
I have a bar plot and want to label my own axis but is dynamic to the number of bins specified by the user.

Lets say I have:
label = {'0 to 10','10 to 20','20 to 30'}
set(gca,'XTickLabel',label)

On my mfile I want it to be dynamic and automate the "label" creation.
Ex.) Now I change settings to 4 labels, so
label = {'0 to 10','10 to 20','20 to 30','30 to 40'}

How do I do create a dynamic label?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top