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

Stop plot_bokeh() from opening browser windows #120

Open
Emporea opened this issue Dec 18, 2021 · 1 comment
Open

Stop plot_bokeh() from opening browser windows #120

Emporea opened this issue Dec 18, 2021 · 1 comment

Comments

@Emporea
Copy link

Emporea commented Dec 18, 2021

pandas_bokeh.output_file("bydate.html")

all_df_per_day.plot_bokeh(
    kind="line",
    xlabel="Date",
    ylabel="Value",
    panning=False,
    zooming=False,
    hovertool=True,
    toolbar_location="right",
    # figsize=(1200, 800),
    sizing_mode="stretch_both",
)

My code line is this, and everytime I output this html file a browser window is opened. Is there an option to disable this? I can not find anything in the documentation.

I imagine something like
pandas_bokeh.output_file("bydate.html", write_only=True)

@PatrikHlobil
Copy link
Owner

Hi @Emporea ,

You can do the following:

from bokeh.io import save
pandas_bokeh.output_file(filename)

p = df.plot_bokeh(…,show_figure=False)

save(p)

hope this helps.

best Patrik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants