PatrikHlobil / Pandas-Bokeh

Bokeh Plotting Backend for Pandas and GeoPandas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

line plot: different marker and line style between curve to keep the hovertool

leopoletti opened this issue · comments

Hello,

I would like to known if it is possible to get a plot where a column is represented by a solid line and another by points or a dashed line?

with the conventional pd.plot I would do basically like this:

merge['level'].plot(kind='line',logx=True)
merge['point'].plot(kind='line',style='x',
            logx=True,)

image

But with pandas_bokeh I do not find a easay way except by using boked directly to plot the points by adding them like this:

p=merge['level'].plot_bokeh(kind='line',
                            logx=True,
                           show_figure=False)
p.scatter(x=merge.dropna().index,
         y=merge.dropna()['point'],
         color='red')
show(p)

image

But doing like this I do not get the hovertool tips, which I do like, for the added point.

Do you see a simple way to achieve this giving me the toolstip? or it is need to developp something?

regards
Leopold

P.S:For the pandas_bokeh example I had to add dropna() otherwise the plot does not frame arround the available data. I guess it needs to create another issue.

Hi @leopoletti ,

I actually started with an implementation of a "figure" parameter that you can pass write on top of an existing plot. however, there is a lot to consider for this so I'm far from finished there.

Best Patrik