数据格式同上几篇
date,jz0,jz1,jz2,jz3,jz4,jz5
http://pypi.python.org
Downloading bokeh-0.12.13.tar.gz (15.4MB)
解压 bokeh-0.12.13.tar.gz
setup.py install
会连互联网下载一些依赖包
bokeh_line6.py
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import bokeh.plotting as bp
# dataFrame
df = pd.read_csv('/python/66001_.txt', parse_dates=['date'])
# Configuring plot output file
bp.output_file("fund_value_1.html", title="Fund net value")
# Create the figure and define some properties
fig = bp.figure(title=u"基金净值图", width=1000,
x_axis_label='date', y_axis_label='value', x_axis_type="datetime")
# add 6 lines
fig.line(df['date'], df['jz0'], line_color="black", name='660010')
fig.line(df['date'], df['jz1'], line_color="blue", name='660011')
fig.line(df['date'], df['jz2'], line_color="green", name='660012')
fig.line(df['date'], df['jz3'], line_color="yellow",name='660013')
fig.line(df['date'], df['jz4'], line_color="red", name='660014')
fig.line(df['date'], df['jz5'], line_color="purple",name='660015')
bp.show(fig)