Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は を持ってggplotいgeom_text()ます:
ggplot
geom_text()
geom_text(y = 4, aes(label = text))
変数テキストの形式は次のとおりです。
number1-number2
number1 の色と number2 の別の色を定義できるかどうかを知りたい (例: 赤と緑の色)
ありがとう!
1 つの方法は、たとえば、number1 と number2 のラベル テキストをデータ フレームの個別の列として持つ場合です。
ggplot(data, aes(x,y)) + geom_text(label=data[,3], color="red", vjust=0) + geom_text(label=data[,4], color="blue", vjust=1)