Pythonデータサイエンスクックブック

(2順目)

レシピ6.3

ライブラリBokehはAnacondにすでにinstallされていたようですんなり動作
3項
f:id:bitop:20160309060741p:plain
描画させたあとでズーム、画像保存(コンテキストメニューからPNG形式をサポート)などができる。
5項目
f:id:bitop:20160309061406p:plain
scatterメソッドは散布図を描画してくれる、パラメータはいろいろある。

scatter(*args, **kwargs)
Creates a scatter plot of the given x and y items.

Parameters: 
x (str or seq[float]) – values or field names of center x coordinates
y (str or seq[float]) – values or field names of center y coordinates
size (str or list[float]) – values or field names of sizes in screen units
marker (str, optional) – a valid marker_type, defaults to “circle”
color (color value, optional) – shorthand to set both fill and line color
source (ColumnDataSource) – a user-supplied data source. If none is supplied, one is created for the user automatically.
**kwargs – Line Properties and Fill Properties

縦軸、横軸ともそうだが軸上にマウスを置いてホイールを動かすと、軸のスケールが変更できる。