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?

답변 (2개)

Jan
Jan 2012년 12월 20일

0 개 추천

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

댓글 수: 1

Hello kity
Hello kity 2012년 12월 21일
char(10) creates a square next to 'bar1'. it doesnt enter...

댓글을 달려면 로그인하십시오.

Hello kity
Hello kity 2012년 12월 21일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2012년 12월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by