Enter in XTickLabel , how to?

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?

Réponses (2)

Jan
Jan le 20 Déc 2012

0 votes

set(gca,'XTickLabel', ['bar1', char(10), num2str(DATA)])

1 commentaire

Hello kity
Hello kity le 21 Déc 2012
char(10) creates a square next to 'bar1'. it doesnt enter...

Connectez-vous pour commenter.

Hello kity
Hello kity le 21 Déc 2012

0 votes

char(10) didnt do the job, does anyone else know how you can make matlab use a second line in the x-axis?

Catégories

En savoir plus sur Data Type Identification dans Centre d'aide et File Exchange

Question posée :

le 20 Déc 2012

Community Treasure Hunt

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

Start Hunting!

Translated by