2

I'm trying to plot multiple series from a dataframe on the same plots in a bokeh figure with LinkedBrush. This probably doesn't make a ton of sense so let me provide an example based on the tutorial here.

Optimally i would like to make the following tweak on the inputs and colors (focus on the second plot):

gridplot([[
circle("yr", "mpg", color="blue", title="MPG by Year", source=source, **plot_config),
circle("hp", ["displ","mpg"], color=["green","red"], title="HP vs. Displacement", source=source, **plot_config),
circle("mpg", "displ", size="cyl", line_color="red", title="MPG vs. Displacement",
             fill_color=None, source=source, **plot_config) ]])

Part of the issue here is the fact that I can't used hold if I'm dropping these plots into a gridplot. I also imagine that "hold" would cause problems with the linked brushing aspect of gridplot. Does anyone know how to do this in bokeh?

1 Answer 1

2

Just answered by greole here: "bokeh overlay multiple plot objects in a gridplot"

In my case, the following code modifications were needed:

circle("yr", "mpg", color="blue", title="MPG by Year", source=source, **plot_config)
p1 = curplot()
figure()
hold(True)
circle("hp", "displ", color="green", title="over", source=source, **plot_config)
circle("hp", "mpg", color="red", source=source, **plot_config),
hold(False)
p2 = curplot()
figure()
circle("mpg", "displ", size="cyl", line_color="red", title="MPG vs. Displacement",
         fill_color=None, source=source, **plot_config)
p3 = curplot()
gp=GridPlot(children=[[p1,p2,p3]])
show(gp)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.