Changing scale in plot
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
venkat siddhartha rama
le 11 Avr 2020
Commenté : venkat siddhartha rama
le 11 Avr 2020
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)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/283732/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/283733/image.png)
0 commentaires
Réponse acceptée
Cris LaPierre
le 11 Avr 2020
You could try setting the Exponent property of the first figure.
x=get(gca);
x.YAxis.Exponent = -3;
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!