Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS 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
Jan 10, 2003
3
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