Skip to content

Commit

Permalink
Timestamp fix to plot
Browse files Browse the repository at this point in the history
  • Loading branch information
aivanova5 committed Sep 30, 2019
1 parent fa7e54f commit 7728747
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pythontools/feeder_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
plt.plot(time_stamp, real_power, label=str(tmp_label)+'% Electrification')
labels_list.append(str(tmp_label)+'% Electrification')
# plt.plot(time_stamp, reactive_power, label='reactive_'+file[:-4])
print(max_real)
plt.gcf().autofmt_xdate()
myFmt = md.DateFormatter('%y-%m-%d %H:%M:%S')
plt.gca().xaxis.set_major_formatter(myFmt)
Expand All @@ -71,11 +70,11 @@
for i in max_real :
for p in filename_perc :
if p[0] in i[0] :
plt.scatter(i[2], i[1])
plt.scatter(i[2], i[1],cmap='gray')
plt.text(i[2],i[1]+0.5,str(round(float(p[1])*100))+'% ' + str(i[2])[-5:],ha='center',va='baseline',**style)
tmp_1 = plt.gcf() # get current figure
plt.gcf().autofmt_xdate()
myFmt = md.DateFormatter('%y-%m-%d %H:%M:%S')
myFmt = md.DateFormatter('%Y-%m-%d')
plt.gca().xaxis.set_major_formatter(myFmt)
plt.draw()
plt.xlabel("Peak time")
Expand Down

0 comments on commit 7728747

Please sign in to comment.