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

Matching a theme

You may already have a theme for your plots that you would like to replicate in plotly. For example, you may prefer your time series plots to have:

  • Only horizontal grid lines
  • A light gray background (#ebebeb) around your plot

In this exercise, your task is to adapt the time series plot of global video game sales from 1980 to 2016 so that it meets these requirements.

Note that plotly has been loaded for you.

Bu egzersiz

Interactive Data Visualization with plotly in R

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

Egzersiz talimatları

  • Remove the vertical grid lines by changing the xaxis options.
  • Set the background color to "#ebebeb".

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Set the background color to #ebebeb and remove the vertical grid
annual_vgsales %>%
  plot_ly(x = ~Year, y = ~Global_Sales) %>%
  add_lines() %>%
  ___(___, ___)
Kodu Düzenle ve Çalıştır