Bokeh datetimetickformatter

谁说我不能喝 提交于 2019-12-24 07:51:34

问题


I'm have some trouble with the DatetimeTickFormatter object from Bokeh. Plots randomly won't generate/update.

I have been searching and found this post at Bokeh, where it states that Plot not shown if DatetimeTickFormatter partially defined. I need some help with how to define it properly. Currently I'm doing this:

from bokeh.models.formatters import DatetimeTickFormatter
from bokeh.plotting import figure
DTF =  DatetimeTickFormatter()
DTF.hours = ["%H:%M"]
DTF.days = ["%d/%m/%Y"]
DTF.months = ["%d/%m/%Y"]
DTF.years = ["%d/%m/%Y"]

and

p = figure()
p.xaxis.formatter = DTF

How should I define DTF “properly”?

来源:https://stackoverflow.com/questions/41836196/bokeh-datetimetickformatter

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