in reply to mixed graph with 2 y-axis
poj#!perl use strict; use GD::Graph::mixed; my @data = ( ["1st","2nd","3rd","4th",], [ 10,11,12,13], [ 1,2,3,4], ); my $graph = GD::Graph::mixed->new(400, 300); $graph->set( types => ['bars','lines'], two_axes => 1, x_label => 'X Label', y1_label => 'Y1 label', y2_label => 'Y2 label', title => 'Some simple graph', y_max_value => 20, y_tick_number => 5, y_label_skip => 1 , ) or die $graph->error; my $gd = $graph->plot(\@data) or die $graph->error; open IMG, '>','mixed.gif' or die $!; binmode IMG; print IMG $gd->gif;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: mixed graph with 2 y-axis
by artperl (Acolyte) on Sep 18, 2015 at 13:14 UTC |