Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I frequently use Python's matplotlib to make figures. I've made my own perl module for making quick plots in perl using matplotlib. I've found matplotlib to make figures inconsistently, and requires a lot more time for me to switch between the languages. So my perl scripts make a python temp file, and execute it. It's not super-efficient, I know, but it saves me time in both writing scripts and reading documentation. Plotting a hash is very easy:

use Matplotlib::Simple 'plot'; plot({ 'output.filename' => 'svg/single.barplot.svg', data => { # simple hash Fri => 76, Mon => 73, Sat => 26, Sun => 11, Thu => 94, T +ue => 93, Wed => 77 }, 'plot.type' => 'bar', xlabel => '# of Days', ylabel => 'Count (Applications)', title => 'Rejections by Days', });

My question: Should I put this module on CPAN?

Replies are listed 'Best First'.
Re: viability of new perl module
by Fletch (Bishop) on Jul 07, 2025 at 00:42 UTC

    Before you do that you might look at Inline::Python and see if using that is more succinct than your tmpfile approach.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re: viability of new perl module
by ysth (Canon) on Jul 06, 2025 at 04:29 UTC
    I wouldn't let the calling out to python stop you. I do wonder, with data as just a hash, what determines the x order.