matlab plot y-axes problem?

1 Ansicht (letzte 30 Tage)
Zafar Iqbal
Zafar Iqbal am 14 Dez. 2015
Kommentiert: dpb am 14 Dez. 2015
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 Kommentare
Zafar Iqbal
Zafar Iqbal am 14 Dez. 2015
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 am 14 Dez. 2015
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???

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by