fix key map for out of index matches

This commit is contained in:
simon 2023-03-27 10:04:32 +07:00
parent f8e06fb9c0
commit ee61496ecb
Signed by: simon
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,11 @@ def chart_fill(plt, y_ticks):
}
for tick in y_ticks[0:-1]:
match = key_map[tick]
if tick > 300:
match = key_map[300]
else:
match = key_map[tick]
plt.axhspan(
match["low"], match["high"], facecolor=match["color"], zorder=0
)