Bokeh vẽ line chart tương tác, hỗ trợ tooltip, legend, nhiều đường trên một figure.
Cài đặt
pip3 install bokeh
conda install bokeh
Ví dụ
from bokeh.plotting import figure, output_file, show
x = [7, 3, 5, 9, 2, 0]
y = [2, 5, 8, 1, 2, 4]
output_file('sample.html')
fig = figure(title='Biểu đồ đường', x_axis_label='x', y_axis_label='y')
fig.line(x, y)
show(fig)
Kết quả

Giải thích
line()nối các điểm theo thứ tự mảng.- Có thể vẽ nhiều đường bằng cách gọi
line()nhiều lần, thêmlegend_label.
Mẹo: Dùng figure(x_axis_type='datetime') cho dữ liệu chuỗi thời gian.