Chart::Plotly::Image - Export static images of Plotly charts
version 0.042
use Chart::Plotly::Plot; use Chart::Plotly::Trace::Scatter; use Chart::Plotly::Image qw(save_image); my $plot = Chart::Plotly::Plot->new( traces => [ Chart::Plotly::Trace::Scatter->new( x => [ 1 .. 5 ], y => [ 1 .. 5 ] ) ] ); save_image(file => 'TestOrca.png', plot => $plot, width => 1024, height => 768, engine => 'auto');
This module generate static images of Plotly charts.
It internally uses either of below modules,
Chart::Kaleido::Plotly's save() method. Note that you will need to explicitly install Chart::Kaleido::Plotly for kaleido to work.
Chart::Plotly::Image::Orca's orca() function
Chart::Plotly::Image::Orca::Client's save_image() function
save_image(file => $file, plot => $plot, width => $width, height => $height, engine => $engine, %rest)
Parameters
file
Image file path.
engine
One of "auto", "kaleido", "orca". Default is "auto", it tries in this order: kaleido, orca.
orca_server
If this parameter is specified it will use Chart::Plotly::Image::Orca::Client.
For example,
save_image(file => $file, plot => $plot, width => $width, height => $height, orca_server => 'http://localhost:9999')
%rest
Rest parameters are passed through to the lower-level functions.
Please report any bugs or feature requests via github: https://github.com/pablrod/p5-Chart-Plotly/issues
This is an unofficial Plotly Perl module. Currently I'm not affiliated in any way with Plotly. But I think plotly.js is a great library and I want to use it with perl.
If you like plotly.js please consider supporting them purchasing a pro subscription: https://plot.ly/products/cloud/
Chart::Kaleido::Plotly, Chart::Plotly::Image::Orca, Chart::Plotly::Image::Orca::Client,
Pablo Rodríguez González <pablo.rodriguez.gonzalez@gmail.com>
This software is Copyright (c) 2022 by Pablo Rodríguez González.
This is free software, licensed under:
The MIT (X11) License
To install Chart::Plotly, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chart::Plotly
CPAN shell
perl -MCPAN -e shell install Chart::Plotly
For more information on module installation, please visit the detailed CPAN module installation guide.