Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotly_json

Inspect JSON sent to plotly.js


Description

This function is useful for obtaining/viewing/debugging JSON sent to plotly.js.

Usage

plotly_json(p = last_plot(), jsonedit = interactive(), pretty = TRUE, ...)

Arguments

p

a plotly or ggplot object.

jsonedit

use listviewer::jsonedit to view the JSON?

pretty

adds indentation whitespace to JSON output. Can be TRUE/FALSE or a number specifying the number of spaces to indent. See jsonlite::prettify.

...

other options passed onto listviewer::jsonedit

Examples

plotly_json(plot_ly())
plotly_json(plot_ly(), FALSE)

plotly

Create Interactive Web Graphics via 'plotly.js'

v4.10.0
MIT + file LICENSE
Authors
Carson Sievert [aut, cre] (<https://orcid.org/0000-0002-4958-2844>), Chris Parmer [aut], Toby Hocking [aut], Scott Chamberlain [aut], Karthik Ram [aut], Marianne Corvellec [aut] (<https://orcid.org/0000-0002-1994-3581>), Pedro Despouy [aut], Salim Brüggemann [ctb] (<https://orcid.org/0000-0002-5329-5987>), Plotly Technologies Inc. [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.