forked from 3wordchant/capsul-flask
capacity limiter and general cleanup
This commit is contained in:
@ -181,6 +181,7 @@ def draw_plot_png_bytes(data, scale, size_x=3, size_y=1):
|
||||
my_plot.xaxis.set_major_formatter(day_formatter)
|
||||
|
||||
max_value = reduce(lambda a, b: a if a > b else b, y, scale)
|
||||
|
||||
average=(sum(y)/len(y))/scale
|
||||
average=average*1.25+0.1
|
||||
|
||||
@ -195,11 +196,8 @@ def draw_plot_png_bytes(data, scale, size_x=3, size_y=1):
|
||||
my_plot.fill_between( x, y, color=highlight_color, alpha=0.3)
|
||||
my_plot.plot(x, y, 'r-', color=highlight_color)
|
||||
|
||||
my_plot.patch.set_facecolor('red')
|
||||
my_plot.patch.set_alpha(0.5)
|
||||
|
||||
if size_y < 4:
|
||||
my_plot.set_yticks([0, scale*0.5, scale])
|
||||
my_plot.set_yticks([0, scale])
|
||||
my_plot.set_ylim(0, scale)
|
||||
|
||||
my_plot.xaxis.label.set_color(highlight_color)
|
||||
|
Reference in New Issue
Block a user