Enter in XTickLabel , how to?

3 Ansichten (letzte 30 Tage)
Hello kity
Hello kity am 20 Dez. 2012
I am editting a graph. I was giving names to each bar with xticklabel. But the way it creates isnt looking nice.
set(gca,'XTickLabel',{['bar1' num2str(DATA)]})
this creates below the bar,
bar1 DATA
what i want is
  • bar1
  • DATA (enter in between)
so how to do this?

Antworten (2)

Jan
Jan am 20 Dez. 2012
set(gca,'XTickLabel', ['bar1', char(10), num2str(DATA)])
  1 Kommentar
Hello kity
Hello kity am 21 Dez. 2012
char(10) creates a square next to 'bar1'. it doesnt enter...

Melden Sie sich an, um zu kommentieren.


Hello kity
Hello kity am 21 Dez. 2012
char(10) didnt do the job, does anyone else know how you can make matlab use a second line in the x-axis?

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by