Plotting polarplot with 2 months in each from a 12 month dataset
Afficher commentaires plus anciens
Hi guys,
Ive been trying to implement a for-loop to plot graphs from a set data with each plot having 2 months in it, so the first plot would have all values from jan to feb and 2nd would have all values from march till april.
I also have been to trying to make the sets of data into 2 lines where the first is the plots for data constiting of jan to jun and the second line being data from jul to dec.
Thank you, any guidance would be appreciated
1 commentaire
Original question by Sebastion Sunny retrieved from Google Cache:
Plotting polarplot with 2 months in each from a 12 month dataset
Hi guys,
Ive been trying to implement a for-loop to plot graphs from a set data with each plot having 2 months in it, so the first plot would have all values from jan to feb and 2nd would have all values from march till april.
I also have been to trying to make the sets of data into 2 lines where the first is the plots for data constiting of jan to jun and the second line being data from jul to dec.
Thank you, any guidance would be appreciated
I have attached the corresponing data and a picture of what my plot should look like

sorry if my code is a bit chaotic:
t = month(windTurbineData.disc_TimeStamp);
R = deg2rad(windTurbineData.mean_NacelleOrientation_Deg);
for i = 1:2:12
i(1)= 1;
plotIndex1 = t == i;
plotIndex2 = t == (i+1);
hold on
subplot(2,3,1)
polarplot(R(plotIndex1),windTurbineData.mean_Power_kW(plotIndex1),'.');
polarplot(R(plotIndex2),windTurbineData.mean_Power_kW(plotIndex2),'.');
hold on
subplot(2,3,2)
polarplot(R(plotIndex1),windTurbineData.mean_Power_kW(plotIndex1),'.');
polarplot(R(plotIndex2),windTurbineData.mean_Power_kW(plotIndex2),'.');
hold on
subplot(2,3,3)
polarplot(R(plotIndex1),windTurbineData.mean_Power_kW(plotIndex1),'.');
polarplot(R(plotIndex2),windTurbineData.mean_Power_kW(plotIndex2),'.');
hold on
subplot(2,3,4)
polarplot(R(plotIndex1),windTurbineData.mean_Power_kW(plotIndex1),'.');
polarplot(R(plotIndex2),windTurbineData.mean_Power_kW(plotIndex2),'.');
hold on
subplot(2,3,5)
polarplot(R(plotIndex1),invalidDataIndex(plotIndex1),'.');
polarplot(R(plotIndex2),invalidDataIndex(plotIndex2),'.');
hold on
subplot(2,3,6)
polarplot(R(plotIndex1),invalidDataIndex(plotIndex1),'.');
polarplot(R(plotIndex2),invalidDataIndex(plotIndex2),'.');
end
subplot(2,3,1)
thetaticks(gca,[0 45 90 135 180 225 270])
thetaticklabels(gca,{'E','NE','N','NW','W','SW','S'});
set(gca,'ColorOrder',cmap)
grid on
subplot(2,3,2)
thetaticks(gca,[0 45 90 135 180 225 270])
thetaticklabels(gca,{'E','NE','N','NW','W','SW','S'});
set(gca,'ColorOrder',cmap)
subplot(2,3,3)
thetaticks(gca,[0 45 90 135 180 225 270])
thetaticklabels(gca,{'E','NE','N','NW','W','SW','S'});
set(gca,'ColorOrder',cmap)
subplot(2,3,4)
thetaticks(gca,[0 45 90 135 180 225 270])
thetaticklabels(gca,{'E','NE','N','NW','W','SW','S'});
set(gca,'ColorOrder',cmap)
subplot(2,3,5)
thetaticks(gca,[0 45 90 135 180 225 270])
thetaticklabels(gca,{'E','NE','N','NW','W','SW','S'});
set(gca,'ColorOrder',cmap)
subplot(2,3,6)
thetaticks(gca,[0 45 90 135 180 225 270])
thetaticklabels(gca,{'E','NE','N','NW','W','SW','S'});
set(gca,'ColorOrder',cmap)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Graphics Performance dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
