ich habe bis jetzt folgende Daten im csv format:
data_FBGS =
Code: Alles auswählen
DateTime;Temp1;Temp2;Temp3;Temp4
2014-09-09 15:59:46.296000;21.119187757507333;15.698826979476781;12.85964391690625;13.03055878929256
2014-09-09 16:09:46.375000;21.148616833440343;15.698826979476781;12.829970326402503;13.001455180445749
und ich habe:
T_Sensor_depth =
Code: Alles auswählen
array([ 0, 1, 2, 3 ])
Bis jetzt habe ich folgendes Probiert:
Code: Alles auswählen
years = mdates.YearLocator() # every year
months = mdates.MonthLocator() # every month
days = mdates.DayLocator() # every day
yearsFmt = mdates.DateFormatter('%Y')
monthsFmt = mdates.DateFormatter('%b-%Y')
daysFmt = mdates.DateFormatter('%d-%m-%Y')
ymajorFmt2 = FormatStrFormatter('%.2f')
ymajorFmt3 = FormatStrFormatter('%.3f')
T_FBGS_max = max(data_FBGS)
T_FBGS_min = min(data_FBGS)
fig2 = plt.figure(2)
ab2 = fig2.add_subplot(212)
#colorbar
cmap = plt.cm.spectral
cmap.set_over(color='w',alpha=10)
cmap.set_under(color='k',alpha=10)
norm = colors.Normalize(vmin = T_FBGS_min, vmax = T_FBGS_max)
#date xAchse
ab2.xaxis.set_major_locator(months)
ab2.xaxis.set_minor_locator(days)
ab2.xaxis.set_major_formatter(monthsFmt)
ab2.xaxis.grid(True, which='major')
xmin,xmax = mdates.date2num([min(data_FBGS),max(data_FBGS)])
ymin,ymax = min(T_fiber_depth),max(T_fiber_depth)
plt.imshow(data_FBGS.T,extent=[xmin,xmax,ymax,ymin],cmap=cmap,origin='bottom',aspect='auto',interpolation='gaussian')
for i in range(len(T_fiber_depth)):
ab2.axhline(T_fiber_depth[i],color='k',lw=0.01,linestyle=':')
ab2.xaxis_date()
fig2.autofmt_xdate()