필터 지우기
필터 지우기

Changing scale in plot

조회 수: 4 (최근 30일)
venkat siddhartha rama
venkat siddhartha rama 2020년 4월 11일
댓글: venkat siddhartha rama 2020년 4월 11일
Greetings friends,
I want to change the scale of Y axis of first figure as that of second figure, i.e I want the scale to be in terms of 10^-3 to have better consistency..I have attached the code for this plot in below section. I would appreciate your help please.
Wind_resource_SOP=zeros(105120,1);
for kk=1:length(Windspeed_mps_inrange)
Wind_resource_SOP(kk)=(0.5*Air_density*(1)*Windspeed_mps_inrange_cubed(kk)); %(w/m^2)
end
Hourly_Wind_resource=((sum(reshape(Wind_resource_SOP*5,12,8760)))/60); %W/m^2
Hourly_Wind_resource=Hourly_Wind_resource';
figure
plot_2_x_axis=(5/60):(5/60):8760;
plot_2_x_axis=plot_2_x_axis';
plot(plot_2_x_axis,repelem(I_total/1000000, 12),'Color','y') % MW 5 min interval
hold on
plot(plot_2_x_axis,Wind_resource_SOP/1000000,'Color','b')% MW 5 min interval
hold on
plot(plot_2_x_axis,(repelem(I_total/1000000, 12))+(Wind_resource_SOP/1000000),'Color','k') % MW 5 min interval
xlabel('Time (Hours) ','FontSize',16)
ylabel('Total Power Available (MW/m^2)','FontSize',16)
plot2_1=sprintf('Solar Resource');
plot2_2=sprintf(' Wind Resource');
plot2_3=sprintf(' Wind + Solar Resources');
legend(plot2_1,plot2_2,plot2_3)
set(legend,'location','best','FontSize',14)
%title('Available Solar And Wind Resources ');
set(gca,'FontSize',20)

채택된 답변

Cris LaPierre
Cris LaPierre 2020년 4월 11일
You could try setting the Exponent property of the first figure.
x=get(gca);
x.YAxis.Exponent = -3;
  댓글 수: 1
venkat siddhartha rama
venkat siddhartha rama 2020년 4월 11일
It worked, Thanks..

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by