필터 지우기
필터 지우기

Space between bars in hist plot

조회 수: 2 (최근 30일)
John
John 2013년 1월 11일
Hi,
I am using the code below to generate a plot like this.
x = randn(30,1);
[y2,x2] = ecdf(x);
[y1,x1] = hist(x);
plotyy(x1,y1,x2,y2,@(x,y)bar(x,y,1,'c'),'stairs')
Would anybody know how to get a space between the bars like the example?
Many thanks

채택된 답변

Daniel Shub
Daniel Shub 2013년 1월 11일
You are looking for the BarWidth property
plotyy(x1,y1,x2,y2,@(x,y)bar(x,y,1,'c', 'barwidth', 0.9),'stairs')

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by