Set the maximum value of the y axis of a bar chart

조회 수: 167 (최근 30일)
Varsha
Varsha 2011년 2월 7일
Hi,
I am working on a bar chart and I need to change the maximum value of the y axis. My data is as such, I have a group of 8 people who have voted whether they like 4 colours. They can choose 0 up to 4 colours by ticking next to the colour. I have gathered this data and I now want to plot a bar char such that the maximum value on the y-axis is 8 even if the maximum vote obtained is 6 for example. Is this possible in Matlab? Right now if the maximum vote obtained is 6 , the maximum value on the y-axis is 6.
Thanks.

채택된 답변

Walter Roberson
Walter Roberson 2011년 2월 7일
ylim([0 8])

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by