Two labels for xaxis for bar graph
이전 댓글 표시
Hi
I have array of some positive and negative values and draw bar graph. I want to label top and bottom of x-axis based upon positive and negative values.
댓글 수: 3
dpb
2020년 4월 7일
Dunno what you mean, precisely...can you show us an example of what you think output should look like?
Kamran Mukhtar
2020년 4월 8일
...
bar(ap,apv)
set(gca,'xtick',ap,'xticklabel',name(ap),'fontsize',8);xtickangle(90)
set(gca,'xaxisLocation','top')
hold on
bar(an,anv)
set(gca,'xtick',an,'xticklabel',name(an),'fontsize',8);xtickangle(90)
set(gca,'xaxisLocation','bottom')
You have only one axis here so you can't have two 'XAxisLocation' positions...you can switch the location back and forth from top to bottom as you've done here, but you can't have two...
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
