how to increasse Bar3 plot bar thickness in both axies
조회 수: 1 (최근 30일)
이전 댓글 표시
i am useing this code for combined my drive cycle with value of 30*80
and at the reult i got slim bar plot as output and i want to incresse thickness of bar in both axis so at the end it will look like a Bar.
i am send you my code if any have suggestion regarding this:
dp_ax=5:10:800;
vfl_ax=0.5:1:30;
figure
width=0.1;
h=bar3(vfl_ax,Data_combined);
Xdat=get(h,'XData');
title('EWP operating profile for combined drive cycle')
xlabel('Pressure diffrance [mbar]')
ylabel('Volume flow rate [L/min]')
axis tight
for ii=1:length(Xdat)
Xdat{ii}=dp_ax(ii)*ones(size(Xdat{ii}));
set(h(ii),'XData',Xdat{ii});
end
댓글 수: 0
답변 (2개)
Cris LaPierre
2021년 5월 3일
You could try using the 'Width' name value pair (see this example), but I think the bigger issue is the scale of your X vs Y axes. Pressure (Y) ranges fro 0-800 while Volume (X) ranges from 0-30. Each bar can have a maximum with of 1, which corresponds to the width of a unit increase in the corresponding X or Y axis. A unit step in X is much bigger than a unit step in Y. This is causing your bars to look skinny.
It appears your bars are all space 10 units apart in Y. Perhaps you can divide your Y values by 10 so the bars will all be spaced 1 unit apart instead?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!