Private
Public Access
1
0

start of multiflex

This commit is contained in:
Sander Roosendaal
2017-07-06 09:57:20 +02:00
parent b26f7df373
commit cde3eaf605
5 changed files with 246 additions and 1 deletions

View File

@@ -69,7 +69,27 @@ watermarkw = 184
watermarkh = 35
watermarkanchor = 'bottom_right'
def errorbar(fig, x, y, xerr=None, yerr=None, color='red',
point_kwargs={}, error_kwargs={}):
fig.circle(x, y, color=color, **point_kwargs)
if xerr:
x_err_x = []
x_err_y = []
for px, py, err in zip(x, y, xerr):
x_err_x.append((px - err, px + err))
x_err_y.append((py, py))
fig.multi_line(x_err_x, x_err_y, color=color, **error_kwargs)
if yerr:
y_err_x = []
y_err_y = []
for px, py, err in zip(x, y, yerr):
y_err_x.append((px, px))
y_err_y.append((py - err, py + err))
fig.multi_line(y_err_x, y_err_y, color=color, **error_kwargs)
def tailwind(bearing,vwind,winddir):
""" Calculates head-on head/tailwind in direction of rowing