NAME
Chart::GGPlot::Backend::Plotly - Plotly backend for Chart::GGPlot
VERSION
version 0.0011
DESCRIPTION
The Plotly backend for Chart::GGPlot.
METHODS
ggplotly
ggplotly($ggplot)
Returns a Chart::Plotly object.
show
show($ggplot, HashRef $opts={})
Show the plot in web browser.
On POSIX systems Chart::Plotly internally uses Browser::Open to open the browser. Browser::Open has a default list of browsers and tries them one by one. You may want to override that behavior by set env var BROWSER
to force a browser command on your system, for example,
export BROWSER=chromium-browser
Below options are supported for $opts
:
width: plot width in pixel
height: plot height in pixel
If neither width
or height
is not specified, the plotly shown in browser will use fluid layout, that is, figure size will be automatically resized when browser window size changes.
save
save($ggplot, $filename, HashRef $opts={})
Export the plot to a static image file. This internally uses Chart::Plotly::Image. And to get Chart::Plotly::Image to work, I recommend you install Chart::Kaleido::Plotly.
Below options are supported for $opts
:
width: plot width in pixel
height: plot height in pixel
iplot
iplot($ggplot, HashRef $opts={})
Generate Plotly plot for IPerl in Jupyter notebook.
SEE ALSO
Chart::Plotly, Chart::Plotly::Image, Chart::Kaleido::Plotly
AUTHOR
Stephan Loyd <sloyd@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2019-2020 by Stephan Loyd.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.