필터 지우기
필터 지우기

Two Bar Plots on one graph, with the bars next to each other, with horizontal axis showing text

조회 수: 3 (최근 30일)
I would like to display bar chart, with bars next to each other ... and I want to display units for x-axis as subjects instead of numbers ...
  댓글 수: 2
Jan
Jan 2018년 6월 28일
What does "next to each other" exactly mean? What are the "units for x-axis"? Do you mean the tick-labels? What are "subjects"? Do you mean strings or char vectors?
VBBV
VBBV 2018년 6월 28일
yeah, tick labels as 'some text' instead of numbers ... and for each tick showing two bars for comparison

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

채택된 답변

Jan
Jan 2018년 6월 28일
편집: Jan 2018년 6월 28일
Maybe:
ax = axes;
y = [75 91 105];
bar(y, 1)
ax.XTick = 1:3;
ax.XTickLabels = {'1st', '2nd', '3rd'};

추가 답변 (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