<html>
<P><BR>
Hello there. I'm trying to write a programa to set a graphic with two axis and two data sets to each axis. Anyone know some tool similar to the GD module to set this graphic, because with GD I'm having troubles. here is an example of what I want to do: <A href="http://libshuff.mib.uga.edu/YvsX.png">http://libshuff.mib.uga.edu/YvsX.png</A>, and below is the code that I'm using with GD module. </P>
<P>#!/usr/bin/perl -w<BR>
<BR>
use GD::Graph::mixed;<BR>
@data = (<BR>
["1st","2nd","3rd","4th","5th"<WBR>,"6th","7th", "8th", "9th"],<BR>
[ 3, 4, 14, 30, 12, 8, 7, 20, 15],<BR>
<SCRIPT><!--
D(["mb"," [ 2, 8, 2, 5, 3, 1, 3, 4, 1],<br /> [ 5, 12, 24, 33, 19, 8, 6, 15, 21],<br /> [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4],<br />);<br /><br />$my_graph \u003d new GD::Graph::mixed( );<br />$my_graph->set(<br /> x_label \u003d> \'X Label\',<br /> y1_label \u003d> \'Y1 label\',<br /> y2_label \u003d> \'Y2 label\',<br /> title \u003d> \'Using two axes\',<br /> y1_max_value \u003d> 40,<br /> y2_max_value \u003d> 8,<br /> y_tick_number \u003d> 8,<br /> y_label_skip \u003d> 2,<br /> long_ticks \u003d> 1,<br /> two_axes \u003d> 1,<br /> use_axis \u003d> [1,2,1,2],<br /> legend_placement \u003d> \'BR\',<br /> x_labels_vertical \u003d> 1,<br /> x_label_position \u003d> 1/2,<br />);<br /><br />$my_graph->set_legend( \'X\', \'XY\', \'diff-X/XY\', \'95%XY\');<br />my $gd \u003d $my_graph->plot(\\@data) or die $my_graph->error;<br />open(IMG, \'>graphTest.gif\') or die "N o posso abrir arquivo$!\\n";<br />binmode IMG;<br />print IMG $gd->gif;<br />close IMG;<br /><br /><br /><br /><br /><br />\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d<wbr />\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d<wbr />\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d<br /><br /> 您收到此信息是由于您订阅了 Google 论坛“BioPerl” 论坛。<br /><br /> 要向此论坛发帖,请发送电子邮件至 <a onclick\u003d\"return top.js.OpenExtLink(window,event,this)\" href\u003d\"mailto:BioPerl@googlegroups.com\">BioPerl@googlegroups.com</a> 或访问 <a onclick\u003d\"return top.js.OpenExtLink(window,event,this)\" href\u003d\"http://groups.google.com/group/BioPerl\" target\u003d_blank>",1]
);
//--></SCRIPT>
[ 2, 8, 2, 5, 3, 1, 3, 4, 1],<BR>
[ 5, 12, 24, 33, 19, 8, 6, 15, 21],<BR>
[ 1, 2, 5, 6, 3, 1.5, 1, 3, 4],<BR>
);<BR>
<BR>
$my_graph = new GD::Graph::mixed( );<BR>
$my_graph->set(<BR>
x_label => 'X Label',<BR>
y1_label => 'Y1 label',<BR>
y2_label => 'Y2 label',<BR>
title => 'Using two axes',<BR>
y1_max_value => 40,<BR>
y2_max_value => 8,<BR>
y_tick_number => 8,<BR>
y_label_skip => 2,<BR>
long_ticks => 1,<BR>
two_axes => 1,<BR>
use_axis => [1,2,1,2],<BR>
legend_placement => 'BR',<BR>
x_labels_vertical => 1,<BR>
x_label_position => 1/2,<BR>
);<BR>
<BR>
$my_graph->set_legend( 'X', 'XY', 'diff-X/XY', '95%XY');<BR>
my $gd = $my_graph->plot(\@data) or die $my_graph->error;<BR>
open(IMG, '>graphTest.gif') or die "N o posso abrir arquivo$!\n";<BR>
binmode IMG;<BR>
print IMG $gd->gif;<BR>
close IMG;<BR>
</P>
<P> </P>
</html><BR>