multi flex binsize in legend
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user