データの範囲に注釈を付けるにはどうすればよいですか? たとえば、 からx = 5
までのデータx = 10
がカットオフよりも大きいとしたら、それをグラフに表示するにはどうすればよいでしょうか。手で注釈を付ける場合は、範囲の上に大きな括弧を描き、括弧の上に注釈を書きます。
私が見た中で最も近いのは、arrowstyle='<->'
andを使用connectionstyle='bar'
して、データの端を指す 2 つの矢印を、それらの尾を結ぶ線で作成することです。しかし、それは正しいことではありません。注釈用に入力したテキストは、バーの上ではなく、いずれかの矢印の下になります。
これが私の試みであり、その結果は次のとおりです。
annotate(' ', xy=(1,.5), xycoords='data',
xytext=(190, .5), textcoords='data',
arrowprops=dict(arrowstyle="<->",
connectionstyle="bar",
ec="k",
shrinkA=5, shrinkB=5,
)
)
私が試みた解決策のもう 1 つの問題は、注釈ブラケットの四角い形状では、範囲を強調表示していることが実際には明確にならないことです (たとえば、中括弧とは異なります)。しかし、それは現時点ではつまらないことだと思います。