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

dear perl monks, Been searching for articles & sample codes regarding GD::Graph::mixed module but I'm not able to find one showing 2-yaxis mixed graph (e.g. Y1 is bar & Y2 is lines). Is this available/supported? or any other module you can recommend that I can explore? thanks much!...

Replies are listed 'Best First'.
Re: mixed graph with 2 y-axis
by poj (Abbot) on Sep 18, 2015 at 10:46 UTC
    #!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;
    poj
      excellent!... thanks POJ!... will play around with your sample code.