Bokeh-area-plots
提供:Dev Guides
ボケ-エリアプロット
エリアプロットは、共通のインデックスを共有する2つのシリーズ間の塗りつぶされた領域です。 ボケのフィギュアクラスは次のように2つのメソッドを持っています-
varea()
varea()メソッドの出力は、1つのx座標配列と2つのy座標配列y1とy2を持つ垂直方向の領域であり、これらの間に塗りつぶされます。
1 | x | The x-coordinates for the points of the area. |
2 | y1 | The y-coordinates for the points of one side of the area. |
3 | y2 | The y-coordinates for the points of the other side of the area. |
例
from bokeh.plotting import figure, output_file, show
fig = figure()
x = [1, 2, 3, 4, 5]
y1 = [2, 6, 4, 3, 5]
y2 = [1, 4, 2, 2, 3]
fig.varea(x = x,y1 = y1,y2 = y2)
output_file('areal')
show(fig)
出力
harea()
一方、harea()メソッドには、x1、x2、およびyパラメーターが必要です。
1 | x1 | The x-coordinates for the points of one side of the area. |
2 | x2 | The x-coordinates for the points of the other side of the area. |
3 | y | The y-coordinates for the points of the area. |
例
from bokeh.plotting import figure, output_file, show
fig = figure()
y = [1, 2, 3, 4, 5]
x1 = [2, 6, 4, 3, 5]
x2 = [1, 4, 2, 2, 3]
fig.harea(x1 = x1,x2 = x2,y = y)
output_file('areal')
show(fig)