Commit a0d54ce9 authored by Leonie Pick's avatar Leonie Pick

Correction of plotting mistake

parent cd27cf72
......@@ -3,8 +3,7 @@ Dump/
# Don't track the following files
Input.nc
Input_old.nc
Input_master.nc
Input_development.nc
Readme.md
# Don't track all files with these endings:
......
This diff is collapsed.
......@@ -1057,16 +1057,20 @@ def MusicalClassified(Time,HTime,Reference,Source,Storms,Class_Proba,Class,Kp_al
fig2.subplots_adjust(bottom=0.06,top=0.9,left=0.115,right=0.99,hspace=0.00,wspace=0.00)
ClassPositive = np.where(Class==1)[0]
ClassNegative = np.where(Class==0)[0]
nPos, binsPos = np.histogram(HTime[Storms[ClassPositive],4],np.arange(1900,2017,1))
nNeg, binsNeg = np.histogram(HTime[Storms[~ClassPositive],4],np.arange(1900,2017,1))
nNeg, binsNeg = np.histogram(HTime[Storms[ClassNegative],4],np.arange(1900,2017,1))
Training = np.where(Reference[:,2]==1)[0]
ClassPositiveRef = np.where(Reference[Training,0]==1)[0]
nPosRef, binsRef = np.histogram(HTime[Reference[Training[ClassPositiveRef],1]],np.arange(1900,2017,1))
nNegRef, binsRef = np.histogram(HTime[Reference[Training[~ClassPositiveRef],1]],np.arange(1900,2017,1))
ClassNegativeRef = np.where(Reference[Training,0]==0)[0]
nPosRef, binsRef = np.histogram(HTime[Reference[Training[ClassPositiveRef],1],4],np.arange(1900,2017,1))
nNegRef, binsRef = np.histogram(HTime[Reference[Training[ClassNegativeRef],1],4],np.arange(1900,2017,1))
axs2b=axs2.twinx()
axs2b.invert_yaxis()
#print(np.sum(nPosRef+nNegRef)*100/np.sum(nPos[95:]+nNeg[95:]))
#print(np.sum(nPosRef+nNegRef)*100/np.sum(nPos+nNeg))
axs2.bar(binsPos[0:-1],height=nPosRef,width=1,align='edge',color='maroon',edgecolor='None',alpha=0.5,label='Training ICMEs',zorder=0)
axs2.bar(binsPos[0:-1],height=nPos,width=1,align='edge',color='None',edgecolor='maroon',linewidth=1,label='Predicted ICMEs',zorder=1)
#axs2.bar(binsPos[0:-1],height=nNegRef,width=1,bottom=nPosRef,align='edge',color='midnightblue',edgecolor='None',alpha=0.5,label='Training C/SIRs',zorder=0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment