[![Build Status](https://travis-ci.com/titsuki/raku-Chart-Gnuplot.svg?branch=master)](https://travis-ci.com/titsuki/raku-Chart-Gnuplot) NAME ==== Chart::Gnuplot - A Raku bindings for gnuplot SYNOPSIS ======== ### SOURCE use Chart::Gnuplot; use Chart::Gnuplot::Subset; my $gnu = Chart::Gnuplot.new(:terminal("png"), :filename("histogram.png")); my @data = (q:to/EOF/).split("\n", :skip-empty)>>.split(" ", :skip-empty); Year Male Female 1950 100 90 1960 100 90 1970 80 70 1980 130 140 1990 140 120 2000 200 210 2010 240 230 2020 400 420 EOF my ($header, *@body) = @data; $gnu.command("set style histogram clustered"); $gnu.legend(:left); my AnyTicsTic @tics = (@body>>.[0]).pairs.map(-> (:key($pos), :value($year)) { %(:label($year), :pos($pos)) }); $gnu.xtics(:tics(@tics)); $gnu.xlabel(:label($header[0])); $gnu.plot(:vertices(@body), :using([2]), :style("histogram"), :title($header[1]), :fill("solid 1.0")); $gnu.plot(:vertices(@body), :using([3]), :style("histogram"), :title($header[2]), :fill("solid 1.0")); $gnu.dispose; ### OUTPUT histogram DESCRIPTION =========== Chart::Gnuplot is a Raku naive bindings for gnuplot. Chart::Gnuplot runs `gnuplot` using `Proc::Async` and enables you to plot chart or graph with Rakuish interface. SUBSET ------ Defined as: subset FalseOnly of Bool is export where { $_ ~~ Bool:U or $_ === False }; subset TrueOnly of Bool is export where { $_ ~~ Bool:U or $_ === True}; subset LabelRotate of Cool is export where { $_ ~~ Cool:U or $_ ~~ Real or $_ === False }; subset AnyLabelRotate of Cool is export where { $_ ~~ Cool:U or $_ eq "parallel" or $_ ~~ Real or $_ === False }; subset LegendMax of Cool is export where { $_ ~~ Cool:U or $_ eq "auto" or $_ ~~ Real }; subset AnyTicsRotate of Cool is export where { $_ ~~ Cool:U or $_ ~~ Real or $_ === False }; subset AnyTicsOffset of Mu is export where { $_ ~~ Mu:U or $_ ~~ FalseOnly or ($_ ~~ List and $_.all ~~ Pair|Real) }; subset AnyTicsTic of Mu is export where { $_ ~~ Mu:U or $_ ~~ Hash and .