Open mosc9575 opened 3 years ago
hi @mosc9575 ,
thanks for submitting this issue. this is indeed a weird behaviour and I have to look at the code why this happens. When I just plot this via Bokeh, I cannot see this behaviour:
Hello, I was curious about this bug.
So, I investigated a little into it and I found that this behavior is linked to the default parameter given to the creation of a figure: output_backend='webgl'
Hence, to reproduce this problem with "pure" bokeh you can use the following code where all parameters used are the same as in pandas_bokeh.
p = figure(title='', toolbar_location='right', active_scroll='wheel_zoom', plot_width=600, plot_height=400, output_backend='webgl', sizing_mode='fixed', x_axis_location='below', x_axis_label='')
p.line(df.index, df.x, legend_label=" x", color="#1f77b4")
p.line(df.index, df.y, legend_label=" y", color="#ff7f0e")
show(p)
By removing the output_backend='webgl'
parameter, the issue is not there anymore.
Maybe pandas_bokeh should not use the webgl backend by default?
Meanwhile, I added an issue on the bokeh repository: https://github.com/bokeh/bokeh/issues/12058
Meanwhile, I added an issue on the bokeh repository: bokeh/bokeh#12058
@vroger11 Your investigation is gold worth. Thanks a lot.
Environment Pandas 1.3.3 Python 3.9.7 pandas_bokeh 0.5.5
Problem When drawing constant lines in with
pandas-bokeh
it looks like there are multiple shorter lines instead on large on. When using a zoom tool this looks very odd.This problem was first mentioned on SO.