Updated Bokeh to 0.5.0, now plots all previous versions of graph in one window

﹥>﹥吖頭↗ 提交于 2019-12-08 16:27:17

问题


Before I updated, I would run my script and output the html file. There would be my one plot in the window. I would make changes to my script, run it, output the html file, look at the new plot. Then I installed the library again to update it using conda. I made some changes to my script, ran it again, and the output file included both the plot before I made some changes AND a plot including the changes. I ran the script again out of curiosity. Three plots in the one file! Ran it again. Four! Deleted the html file (instead of overwriting). Five! Changed the name of the output html file. Six! I even tried changing the name of the script. The plots just keep piling up.

What's going on? Why is it plotting every version of the graph I've ever made?


回答1:


as of 0.5.1 there is now bokeh.plotting.reset_output that will clear all output_modes and state. This is especially useful in situations where a new interpreter is not started in between executions (e.g., Spyder and the notebook)




回答2:


are you running in a notebook? Or are you running "python myscript.py" several times? If the latter, I don't see how that's possible, but it would definitely be a bug. Can you post your script or a minimal example? If you make an issue on the Bokeh GH issue tracker we can take a look as well. https://github.com/ContinuumIO/bokeh/issues?labels=&page=1&state=open



来源:https://stackoverflow.com/questions/24739390/updated-bokeh-to-0-5-0-now-plots-all-previous-versions-of-graph-in-one-window

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!