Help language development. Donate to The Perl Foundation

Chart::EasyGnuplot zef:Air4x last updated on 2023-02-06

e2bb477348a639963253ab7aec45769a52d9f31b/

Chart::EasyGnuplot

A simple modules to make simple plots, without having to think about Gnuplot internals.

Example

Let's plot the fuction "sin(x)-x*cos(x)"

use v6.d;
use Chart::EasyGnuplot;

my @x = 0.0 .. (2*π);
my @y = gather {
    for @x -> $x{
        take (sin($x)-$x*cos(x));
    }
}

line-plot("sin(x)-x*cos(x)", @x, @y, "Example.png");

plotted func