Fixed the plot bugs of date and colorbar

replace/d310ffa2842eae0ae9947723c0f995f4f9060f33
Meng Li 2019-11-07 12:31:11 -05:00
parent 2adfe8d81a
commit e76051e399
1 changed files with 3 additions and 2 deletions

View File

@ -17,8 +17,9 @@ def getComplianceHeatmap(dates, compliance_matrix, pid, output_path, bin_size):
"{0:0=2d}".format(x % bins_per_hour * bin_size) for x in range(24 * bins_per_hour)]
plot = go.Figure(data=go.Heatmap(z=compliance_matrix,
x=x_axis_labels,
y=dates,
colorscale='Viridis'))
y=[datetime.datetime.strftime(date, '%Y/%m/%d') for date in dates],
colorscale='Viridis',
colorbar={'tick0': 0,'dtick': 1}))
plot.update_layout(title="Five minutes has_row heatmap for " + pid)
pio.write_html(plot, file=output_path, auto_open=False)