I’m trying to collate similar, but different, plots, based on the same data source, into a single page with the tabbed pane layout.
Initially, I’m just trying to plot two scatter ones. They use different axes, but the source dataframe is meant to be the same. However, unless I created two unique source instances, it would only plot the second plot - in both tabs.
source = ColumnDataSource(data)
source2 = ColumnDataSource(data)
p1 = figure(tools=TOOLS, title=y[:-9])
p1.scatter(x=OC, y=HC,source=source,radius=radii, color =‘mz’,fill_color=colors, fill_alpha=0.75,line_color=None)
tab1 = Panel(child=p1, title=“Plot1”)
p2 = figure(tools=TOOLS, title=y[:-9])
p2.scatter(x=Cno, y=DBE,source=source2,radius=radii, color =‘Ono’,fill_color=colors, fill_alpha=0.75,line_color=None)
tab2 = Panel(child=p2, title=“Plot2”)
tabs = Tabs(tabs=[ tab1, tab2 ])
show(tabs) # open a browser
When I have source=source for both (and no source2), both tabs show the second plot.
Is this a feature or a bug?
Is it because they are both scatter plots?