필터 지우기
필터 지우기

matlab plot y-axes problem?

조회 수: 2 (최근 30일)
Zafar Iqbal
Zafar Iqbal 2015년 12월 14일
댓글: dpb 2015년 12월 14일
my y-axes pick values from data(bar graph values from each bar on y-axes) i.e 0,.5,1,1.5,2,2.5,3,3.5,4,4.5*10^4 and big issue is it comes in power of 10 on top of plot the values come from bars by default. I change[d] the y axes value by different methods but with that the bar go very longer and touch the top which does not show real values. [I] want to display 24 hours from 1 to 24 on y axes and also the bar and its data does not affect. plots are attached please comments?i used axes,ylimit,and below but no method worked.
% set(gca,'YTick',['0','5000','10000','15000','20000','25000','30000','35000','40000','45000'],'YLim',[0:45000])
% ax = gca;
% c = ax.YTickLabel;
% ax.YTickLabel = ['0','5000','10000','15000','20000','25000','30000','35000','40000','45000'];
%axis([-inf,12,1,45000])
axis([0,13,0,45000])
%yt=[yt1,yt2,yt3,yt4,yt5,yt6,yt7,yt8,yt9,yt10];
%yt = get(gca,'YTick');
%set(gca,'YTickLabel', sprintf('%d',0,5000,10000,15000,20000,25000,30000,35000,40000,45000))
% set(gca,'YTickLabel', sprintf('%d',5000,10000))
% set(gca,'YTickLabel', sprintf('%d',10000,15000))
% set(gca,'YTickLabel', sprintf('%d',15000,20000))
% set(gca,'YTickLabel', sprintf('%d',20000,25000))
% set(gca,'YTickLabel', sprintf('%d',25000,30000))
% set(gca,'YTickLabel', sprintf('%d',30000,40000))
% set(gca,'YTickLabel', sprintf('%d',40000,45000))
% set(gca,'YTickLabel', sprintf('%d',50000,55000))
% set(gca,'YTickLabel', sprintf('%d',60000,65000))
% set(gca,'YTickLabel', sprintf('%.1f|',yt))
  댓글 수: 3
Zafar Iqbal
Zafar Iqbal 2015년 12월 14일
i want to get red off exponent value for which i use above code sprintf but it return a sting of values and my work not done?
dpb
dpb 2015년 12월 14일
Please attach the data; not much anybody can do to 'spearmint with anything just looking at the image. Makes it hard since you don't show us the underlying call to create the plots initially, either. From what you've shown it seems difficult to see why the bars would/should have 24-hr ranges???

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

답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by