PatrikHlobil / Pandas-Bokeh

Bokeh Plotting Backend for Pandas and GeoPandas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Multiple plots in a single plot.

kkimdev opened this issue · comments

Being able to simply do data_frame.plot() with Pandas-Bokeh is very handy and a huge productivity boost. Though currently there is no way to do multiple plots in a single plot to my understanding. An alternative is using bare Bokesh (https://stackoverflow.com/questions/70436454/pandas-bokeh-how-to-plot-two-pd-series-in-a-single-plot-in-colab) and it requires substantially more boilerplates.

fwiw, this is the default behavior of pandas' matplotlib backend.

Hi, this is the goal of my PR #122. Using this, it will be possible to use the same figure for different plots:

s1 = pd.DataFrame(np.random.randint(0, 7, size=10), columns=['line'])
s2 = pd.DataFrame(np.random.randint(0, 3, size=10), columns=['bar'])

fig = s1.plot(kind='line', show_figure=False)
s2.plot(kind="bar", figure=fig)

I am waiting for @PatrikHlobil to accept my PR. Since you can try using my fork.

Hi everyone! By any chance, do you have any updates on this? It would be a very useful feature.
Thanks!