MATLAB : problem with bar graph
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I have a bar graph with 2 different data (each with a different color as you can see on the picture). I would like to move the x-axis so it crosses at y=-100 (for example). So if a data = -40, I would like to have a bar from -100 to -40.
An other question : is it possible to write each value of the x-axis vertically (because with all the values, we can't see anything).
Thank you in advance,
Best regards,
댓글 수: 0
채택된 답변
dpb
2015년 3월 12일
For the reference, use
hBar=bar(X,Y,'basevalue',-100);
Doesn't move the axes but is probably the effect you're looking for.
Unless it's been introduced since R2012b, there is no 'textangle' property for the tick labels; there have been advances in using the TeX interpreter; you can always try to gussy it up via that option; I've not tried rotation to see if the builtin interpreter knows it or not.
Failing that, you can always use text and label the ticks manually. I'd guess looking at the image you've got so many that you simply don't have room for all of them irregardless of orientation but only trying it out will tell if can make them all fit legibly.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!