私はいくつかのオブザーバブルのtimeseriesからなるデータセットを持っていますが、bokehを使って時系列の異なるポイントで位相ダイアグラムを見たいと思います。私が知りたいのは、選択されたグリフまたは選択されていないグリフのプロパティを変更する方法です(この場合、選択されていないポイントのアルファ値を減らしたり、選択したグリフの色を変更したい)。bokehで選択/選択されていないグリフのプロパティを設定する方法
以下のコードは、ipythonノートブックに必要なインターフェイスを作成し、users guidehttp://bokeh.pydata.org/en/0.10.0/docs/user_guide/interaction.html#linked-brushingの例に基づいています。私は設定するための任意の明白なオプションを見つけることができないと私は本当にむしろこの1つの事のためのjavascriptを習得する必要はないだろう。
import numpy as np
from pandas import DataFrame
from bokeh.plotting import figure, output_notebook, show, gridplot
from bokeh.models import ColumnDataSource, widgets
def znzt_ts():#, plot_antisym=False, **kwargs):
t = np.arange(1000)
Eu = np.sin(t * np.pi/10) + np.random.random(1000)
Ez = np.cos(t * np.pi/10) + np.random.random(1000)
ts = DataFrame({'t': t, 'Eu': Eu, 'Ez': Ez})
tools = 'box_zoom,pan,reset,save,box_select'
source = ColumnDataSource(data=ts)
original_source = ColumnDataSource(data=ts)
p1 = figure(plot_width=300, plot_height=300,
tools=tools)
p2 = figure(plot_width=300, plot_height=300, tools=tools,)
p1.circle('t', 'Eu', source=source, size=1)
p2.circle('Eu', 'Ez', source=source, size=1)
return gridplot([[p1, p2]])
gp = znzt_ts()
output_notebook()
show(gp)
これはすでに見ましたか? (http://bokeh.pydata.org/en/0.9.3/docs/user_guide/styling.html) – Adam