Commit b85ef0f6 authored by Leonie Pick's avatar Leonie Pick

Small Changes to plots Selection abd Diagnosics

parent 8520c990
This diff is collapsed.
......@@ -20,7 +20,7 @@ def Selection(Time,Date,HMC,Index_thres1,StormIndices,IndexMin,IndexMin1,IndexMi
end = np.where(Time[:,4]==ends[i])[0][0]
ax[i].plot(Time[start:end,4],HMC[start:end],color='gray')
ax[i].plot(Time[start:end,4],Index_thres1[start:end],linestyle='--',color='midnightblue',label=r'HMC$_{\mathrm{thres}}\in$ ['+str(np.around(max(Index_thres1[start:end]),2))+' nT ,'+str(np.around(min(Index_thres1[start:end]),2))+' nT]')
ax[i].plot(Time[start:end,4],Index_thres1[start:end],linestyle='--',color='midnightblue',label=r'$Hl_t\in$ ['+str(np.around(max(Index_thres1[start:end]),2))+' nT ,'+str(np.around(min(Index_thres1[start:end]),2))+' nT]')
ax[i].scatter(Time[StormIndices,4],HMC[StormIndices],color='midnightblue',s=5,zorder=3)
ax[i].set_xlim([Time[start,4],Time[end,4]])
......@@ -69,7 +69,7 @@ def Selection(Time,Date,HMC,Index_thres1,StormIndices,IndexMin,IndexMin1,IndexMi
if Save == True:
fig.savefig('./Dump/Fig/development/EventSelection.pdf',format='pdf',dpi=200,transparent=True)
#fig.savefig('./Dump/Fig/development/EventSelection.png',format='png',dpi=200,transparent=True)
fig.savefig('./Dump/Fig/development/EventSelection.png',format='png',dpi=200,transparent=True)
plt.show()
###
###
......@@ -203,7 +203,8 @@ def Diagnostics(n_features,n_classes,NData, Save):
fig.subplots_adjust(bottom=0.08,top=0.95,left=0.05,right=0.98,wspace=0.2,hspace=0.2)
ax = ax.ravel()
fNames = [r'$\Delta$HMC', r'dHMC/dt,r', r'$\Delta$dHMC/dt', r'r$\left(\hat{Z}_6,\hat{Z}_{18}\right)$', r'Range r$\left(\hat{Z}_{6\mathrm{ lag}}\mathrm{, }\hat{Z}_{18}\right)$', r'MAD$\left(d\hat{Z}_6/dt\right)$', r'arg max $Z_{\mathrm{MLT}}$', r'max$\left(ASY_{max}\right)$', 'FWHM $ASY_{\mathrm{DD}}$', 'Solar cycle phase', 'Recurrence', 'Ideal (synthetic)']
#fNames = [r'$\Delta$HMC', r'dHMC/dt,r', r'$\Delta$dHMC/dt', r'r$\left(\hat{Z}_6,\hat{Z}_{18}\right)$', r'Range r$\left(\hat{Z}_{6\mathrm{ lag}}\mathrm{, }\hat{Z}_{18}\right)$', r'MAD$\left(d\hat{Z}_6/dt\right)$', r'arg max $Z_{\mathrm{MLT}}$', r'max$\left(ASY_{max}\right)$', 'FWHM $ASY_{\mathrm{DD}}$', 'Solar cycle phase', 'Recurrence', 'Ideal (synthetic)']
fNames = [r'$k$=1',r'$k$=9',r'$k$=11',r'$k$=2',r'$k$=10',r'$k$=3',r'$k$=6',r'$k$=7',r'$k$=8',r'$k$=4',r'$k$=5',r'$k$=12']
All = sum(len(NData[j]) for j in range(n_classes))
if n_classes == 2:
......@@ -233,7 +234,8 @@ def Diagnostics(n_features,n_classes,NData, Save):
ax[k].set_xlabel('Standardized feature value', fontsize=18)
#if i == n_features-1: ax[i].text(0.26,1.02,'Synthetic',fontsize=8,transform=ax[i].transAxes)
#else:
ax[k].text(0,1.02,str(k+1)+': '+fNames[i],fontsize=18,transform=ax[k].transAxes)
#ax[k].text(0,1.02,str(k+1)+': '+fNames[i],fontsize=18,transform=ax[k].transAxes)
ax[k].text(0,1.02,fNames[i],fontsize=18,transform=ax[k].transAxes)
ax[k].set_xlim([0,1]); ax[k].set_xticks([0,0.25,0.5,0.75,1.0])
ax[k].tick_params(axis = 'y', which='both',direction = 'in',labelsize=16)
......@@ -242,8 +244,8 @@ def Diagnostics(n_features,n_classes,NData, Save):
k += 1
if Save == True:
fig.savefig('./Dump/Fig/Features.pdf',format='pdf',dpi=200,transparent=True)
fig.savefig('./Dump/Fig/Features.png',format='png',dpi=200,transparent=True)
fig.savefig('./Dump/Fig/development/Features.pdf',format='pdf',dpi=200,transparent=True)
#fig.savefig('./Dump/Fig/Features.png',format='png',dpi=200,transparent=True)
plt.show()
###
###
......
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