Different legends for multiple graphs
Afficher commentaires plus anciens
Im trying to do multiple legends for each of my polar plots, I want a legend on each one stating the two months that are on the plot. When I put down my first two (jan and feb) they go onto everyone plot and im not sure how to change it so it will change for each plot.
for ii = 1:2:12
plotIndex1 = (month(datetime(windTurbineData.disc_TimeStamp))==ii);
plotIndex2 = (month(datetime(windTurbineData.disc_TimeStamp))==ii+1);
hs = subplot(2,3,(ii+1)/2,polaraxes);
polarplot(windTurbineData.mean_NacelleOrientation_Deg(plotIndex1==1,:)*pi/180,windTurbineData.mean_Power_kW(plotIndex1==1,:),'.','color',rainbow(ii,:))
hold on
polarplot(windTurbineData.mean_NacelleOrientation_Deg(plotIndex2==1,:)*pi/180,windTurbineData.mean_Power_kW(plotIndex2==1,:),'.','color',rainbow(ii+1,:))
hold on
hs.ThetaDir = 'clockwise';
hs.ThetaZeroLocation = 'top';
hs.ThetaTick = [0,45,90,135,180,225,270,315];
hs.ThetaTickLabel = {'N','NE','E','SE','S','SW','W','NW'};
hs.RTick = [4000,8000];
hs.RTickLabel = {'4MW','8MW'};
hs.FontSize = 10;
rlim([0,8000])
legend('Jan 19','Feb 19',)
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Polar Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!