This part of the book teaches you how to leverage the plotly R package to create a variety of interactive graphics. There are two main ways to creating a plotly object: either by transforming a ggplot2 object (via ggplotly()) into a plotly object or by directly initializing a plotly object with plot_ly()/plot_geo()/plot_mapbox(). Both approaches have somewhat complementary strengths and weaknesses, so it can pay off to learn both approaches. Moreover, both approaches are an implementation of the Grammar of Graphics and both are powered by the JavaScript graphing library plotly.js, so many of the same concepts and tools that you learn for one interface can be reused in the other. Any graph made with the plotly R package is powered by the JavaScript library plotly.js. The plot_ly() function provides a ‘direct’ interface to plotly.js with some additional abstractions to help reduce typing.

Features

  • Web-based ggplot2 graphics
  • An R package for creating interactive web graphics via the open source JavaScript graphing library plotly.js
  • Use plotly without ggplot2
  • The plotly package takes a purely functional approach to a layered grammar of graphics
  • For more complex plots that modify a plotly graph many times over, code written in this way can become cumbersome to read
  • plotly has both add_histogram() and add_bars()

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow plotly

plotly Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of plotly!

Additional Project Details

Programming Language

R

Related Categories

R Data Visualization Software, R Libraries

Registered

2022-07-13