Private
Public Access
1
0

multi flex binsize in legend

This commit is contained in:
Sander Roosendaal
2017-07-09 21:13:02 +02:00
parent 2f75476cc3
commit 4bc1423148
2 changed files with 12 additions and 3 deletions

View File

@@ -1176,7 +1176,7 @@ def interactive_chart(id=0,promember=0):
def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
ploterrorbars=False,
title=None):
title=None,binsize=1):
if datadf.empty:
return ['','<p>No non-zero data in selection</p>']
@@ -1293,7 +1293,6 @@ def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
yerr=ploterrorbars,
point_kwargs={
'line_color':None,
'legend':yparamname,
'size':"groupsize",
'fill_color':"color",
},
@@ -1309,6 +1308,15 @@ def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
else:
plot.yaxis.axis_label = axlabels[yparam]
binlabel = Label(x=100,y=100,x_units='screen',
y_units='screen',
text="Bin size {binsize:3.1f}".format(binsize=binsize),
background_fill_alpha=0.7,
background_fill_color='white',
text_color='black',
)
plot.add_layout(binlabel)
yrange1 = Range1d(start=yaxmin,end=yaxmax)
plot.y_range = yrange1