R バージョンの ggplot を使用して、この質問に答えるために完全な Yhat doc を見つけることができませんでした。繰り返しソリューションに戻ろうとしました。
一般的に、Python ggplot プロットにテキストで注釈を付けるための正しい構文は何ですか?より具体的には Statsmodels の変数を使用します (以下のこのコード ブロックの最後の行を除いてすべてが機能します)?
from ggplot import *
ggplot(aes(x='rundiff', y='winpct'), data=mlb_df) +\
geom_point() + geom_text(aes(label='team'),hjust=0, vjust=0, size=10) +\
stat_smooth(method='lm', color='blue') +\
ggtitle('Contenders vs Pretenders') +\
ggannotate('text', x = 4, y = 7, label = 'R^2')
ありがとう。