Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

line_join option not respected? Jaggy line plots for noisy data #92

Open
Thomasillo opened this issue Dec 8, 2020 · 5 comments
Open
Labels
bug Something isn't working question Further information is requested

Comments

@Thomasillo
Copy link

Plotting noisy data using pandas_bokeh yields visually incorrect results.

import pandas as pd
import pandas_bokeh
import numpy as np

pd.set_option('plotting.backend', 'pandas_bokeh')
pandas_bokeh.output_notebook()

df = pd.DataFrame(np.random.rand(2000))
assert (df.min() > 0).all()
assert (df.max() < 1).all()
df.plot_bokeh(line_join="bevel", ylim=(-0.5,1.5))

Bildschirmfoto 2020-12-08 um 12 54 17

Doing the plot "by hand" does not.

from bokeh.plotting import figure
from bokeh.io import output_notebook, show
p1 = figure(title="bevel",plot_width=450, plot_height=250)
p1.line(df.index, df.iloc[:,0], line_join="bevel")
show(p1)

Bildschirmfoto 2020-12-08 um 12 56 54

@PatrikHlobil
Copy link
Owner

Hi @Thomasillo ,

this is quite an interesting behaviour. thanks for reporting this issue. I will have a look at it.

Best Patrik

@PatrikHlobil
Copy link
Owner

Interestingly, I cannot reproduce your behaviour.
image

Which version of Bokeh and Pandas-Bokeh are you using?

I am using
image

Best Patrik

@Thomasillo
Copy link
Author

Thomasillo commented Dec 8, 2020

Hi Patrik, my versions are

pd.__version__, bokeh.__version__, pandas_bokeh.__version__

('1.1.5', '2.2.3', '0.5.2')

Browser is Safari, but in firefox it's the same.

@PatrikHlobil
Copy link
Owner

That is really weird. Maybe something MacOS specific?

@PatrikHlobil PatrikHlobil added bug Something isn't working question Further information is requested labels Jan 7, 2021
@PatrikHlobil
Copy link
Owner

HI @Thomasillo ,

I could reproduce such problems on iOS when running a Bokeh server.

Seems to be a problem with webkit and Bokeh itself.

I indeed found an old Bokeh issue here (bokeh/bokeh#7951). Maybe try to disable webgl via the option df.plot_bokeh(..., webgl=False).

Best Patrik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants