BaşlayınÜcretsiz Başlayın

Alternative color formats

R has a large number of named colors, but sometimes you need a color that isn't named. For example, what if your organization's specific shade of blue is somewhere between "navy" and "dodgerblue4"? Luckily, plotly allows you to specify colors using other formats, including RGB, RGBA, HEX, HCL, HSL, and HSV.

In this exercise, you will change the histogram's color to using HEX and RGB formats.

Note that plotly has already been loaded for you.

Bu egzersiz

Interactive Data Visualization with plotly in R

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Change the color of the histogram using a hex code
vgsales2016 %>%
  plot_ly(x = ~Critic_Score) %>%
  add_histogram(___)
Kodu Düzenle ve Çalıştır