ggplot2では、色を名前または16進コードで設定するオプションがあります。同じ方法でrgb値を使用する方法はありますか?私はドキュメントを検索しましたが、迅速な答えは「ノー」と思われます。 (私がrgbを使用したい理由は、いくつかのプロットで使う色をいくつか持っており、それらはすべてRGB形式であるからです。hereのような場所から16進数を得ることができます。私はちょうどまっすぐggplot()
に値を入力することができrgb()with ggplot2 in R
6
A
答えて
8
あなたは六角に分数のRGB値を変換する機能RGBを使用することができますどのような機能[ `rgb`](HTTPSについて
rgb(0.1,0.2,0.3)
[1] "#1A334D"
+3
素晴らしい。私はこのディレクトリを使用したあなたがRGBカラーを端数で持っていない場合、 'maxColorValue'引数が必要です:' scale_colour_manual(values = c(rgb(207、31、46、maxColorValue = 255))、 "#ffda85 ")))' – RobertMc
関連する問題
- 1. ggplot2 plot question in R
- 2. R shiny app with ggplot2 error
- 3. 可変幅バーggplot2 barplot in R
- 4. for R with matrix in loop
- 5. Boxplot with ggplot2
- 6. date_minor_breaks in ggplot2
- 7. qqnormとqqline in ggplot2
- 8. バイオリンプロットggplot2 with width with width
- 9. Siamese Network with RGB images
- 10. グラフGLM in ggplot2
- 11. xlab in ggplot2
- 12. ggplot2 - R
- 13. floating.pie in plotrix in R
- 14. Bank to 45 in ggplot2
- 15. X軸in ggplot2:factor
- 16. 複数の変数のスタックバープロットを作成する - ggplot2 in R
- 17. Rのggplot2:グラフ
- 18. R - ggplot2 geom_line dodge
- 19. R Newb ggplot2 issue
- 20. Rのggplot2:
- 21. R - ggplot2並列カテゴリプロット
- 22. R ggplot2 boxplotでクリック
- 23. R slopegraph geom_line color ggplot2
- 24. R ggplot2グループ化バープロット
- 25. 密度プロットR、ggplot2
- 26. スタックバーのエラーバーggplot2 R
- 27. R - マイルストーンチャートでのggplot2
- 28. R Studioのggplot2ライブラリインストール
- 29. %in%in R
- 30. Cartogram + choropleth map in R
:// STATを。 – bouncyball
'qplot(x = 1、fill = I(rgb(0.1、0.8、0.5)))' – Axeman
Nice!Iおかげで、Axeman&bouncyball。 – RobertMc