2
私は比較的新しいpythonです。私はいくつかのtimeseriesデータをプロットするhtmlファイルを作成するためにbokehを使用しています。Bokeh datetimetickformatterを使用してダニをカスタマイズする方法
x軸のティックを「DD/MM HH:SS」とフォーマットしたいと思います。私はコードの簡略化されたバージョンを書いています:
from bokeh.plotting import figure, output_file, save, show
from bokeh.models import DatetimeTickFormatter
import datetime as dt
t=[dt.datetime(2017, 1, 9, 16, 14, 10),dt.datetime(2017, 1, 9, 16, 15, 20)]
Temp=[200,210]
output_file("Burner SPC test.html")
p1=figure(title="Tip1 TC", x_axis_label="Time", y_axis_label="Temp Diff", x_axis_type="datetime")
p1.line(t,Temp)
p1.xaxis.formatter=DatetimeTickFormatter(formats=dict(
days=["%??"],
months=["%??"],
hours=["%???"],
minutes=["%???"])) #not sure how to format here to get the desired output
show(p1)
助けを非常に感謝します。 ありがとうございます。