MulaiMulai sekarang secara gratis

Understanding plotly limitations

You have seen that some ggplot plots cannot be directly converted into a Plotly object. For instance, horizontally oriented boxplots plotted using ggplot2 cannot be converted directly to horizontally oriented plotly boxplots. Vertically oriented ggplot boxplots must be plotted before carrying out a coordinate flip.

In the following exercises, you will fix some Plotly plots, so that they render correctly. You will also see some limitations of Plotly.

The London Airbnb dataset has been stored as a data frame called listings, and the tidyverse and plotly libraries have been loaded for you.

Latihan ini adalah bagian dari kursus

Building Dashboards with shinydashboard

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Modify to obtain a set of vertical boxplots
boxplots <- listings %>%
  ggplot(aes(x=reviews_per_month, y=room_type)) +
  geom_boxplot() +
  theme_classic()

# Obtain a horizontal set of plotly boxplots
___
Edit dan Jalankan Kode