Chart::Plotly::Image::Orca - Export static images of Plotly charts using orca
version 0.024
#!/usr/bin/env perl use strict; use warnings; use utf8; use Chart::Plotly::Plot; use Chart::Plotly::Trace::Scatter; use Chart::Plotly::Image::Orca; my $plot = Chart::Plotly::Plot->new(traces => [ Chart::Plotly::Trace::Scatter->new( x => [ 1 .. 5 ], y => [ 1 .. 5 ] )]); Chart::Plotly::Image::Orca::orca(plot => $plot, file => "TestOrca.png");
This module generate static images of Plotly charts without a browser using Orca
Orca is an Electron app that must be installed before using this module. You can either,
Install the Alien::Plotly::Orca module from CPAN. Or,
Install plotly-orca yourself and have a orca command findable via the PATH env var in your system, see also https://github.com/plotly/orca#installation.
orca
PATH
orca(plot => $plot, file => $file, %rest)
Export Chart::Plotly::Plot as a static image file.
This function is a wrapper over the plotly orca command. Most of its named parameters are mapped to orca's command line options. See also the output of orca graph --help.
orca graph --help
Returns a true value if the orca command is successful.
Object to export
Filename (with or without path) to export
Sets the output format (png, jpeg, webp, svg, pdf, eps). By default it's inferred from the specified file name extension.
Sets the image scale.
Sets the image width.
Sets the image height.
Sets path to MathJax files. Required to export LaTeX characters.
Turns on safe mode: where figures likely to make browser window hang during image generating are skipped.
Turn on verbose logging on stdout.
Starts app in debug mode and turn on verbose logs on stdout.
Checks that orca command available is the plotly image exporter, as there may be some other different command also named "orca", like https://help.gnome.org/users/orca/stable/
Checks that orca command is available and the plotly image exporter
Returns the orca version
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/
Alien::Plotly::Orca
Pablo Rodríguez González <pablo.rodriguez.gonzalez@gmail.com>
This software is Copyright (c) 2018 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.