Bokeh-wedges-and-arcs

提供:Dev Guides
移動先:案内検索

ボケ-ウェッジとアーク

  • arc()メソッド*は、x座標とy座標、開始角度と終了角度、および半径に基づいて単純な線弧を描画します。 角度はラジアンで示されますが、半径は画面単位またはデータ単位である場合があります。 くさびは塗りつぶされた円弧です。
  • wedge()メソッド*には、arc()メソッドと同じプロパティがあります。 どちらの方法にも、オプションの方向プロパティが用意されています。これは、円弧/くさびのレンダリングの方向を決定する時計または反時計の場合があります。 angular_wedge()関数は、内側と外側の半径の弧の間の塗りつぶされた領域をレンダリングします。

これは、*アーク*と*ウェッジグリフ*がボケ図形に追加された例です-

from bokeh.plotting import figure, output_file, show
import math
fig = figure(plot_width = 300, plot_height = 300)
fig.arc(x = 3, y = 3, radius = 50, radius_units = 'screen', start_angle = 0.0, end_angle = math.pi/2)
fig.wedge(x = 3, y = 3, radius = 30, radius_units = 'screen',
start_angle = 0, end_angle = math.pi, direction = 'clock')
fig.annular_wedge(x = 3,y = 3, inner_radius = 100, outer_radius = 75,outer_radius_units = 'screen',
inner_radius_units = 'screen',start_angle = 0.4, end_angle = 4.5,color = "green", alpha = 0.6)
show(fig)

出力

くさび形