kryberg has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl 2 3 use strict; 26 # line chart class 27 use GIFgraph::lines; 28 use GD; 29 30 31 # create a new object 32 my $graph = new GIFgraph::lines(600,400); 33 34 $graph->set_title_font(gdMediumBoldFont); 35 $graph->set_x_label_font(gdMediumBoldFont); 36 $graph->set_y_label_font(gdMediumBoldFont); 37 $graph->set_x_axis_font(gdMediumBoldFont); 38 $graph->set_y_axis_font(gdMediumBoldFont); 39 $graph->set_legend_font(gdMediumBoldFont); 40 $graph->set(logo=>'80x22_green.gif',logo_resize=>.8,logo_posit +ion=> 'LR'); 41 $graph->set(textclr=>'black',labelclr=>'black',axislabelclr=>' +black',accentclr=>'black',bgclor=>'white ',fgclr=>'black',transparent=>0,x_label_skip=>300); 42 $graph->set(t_margin=>10,b_margin=>10,l_margin=>10,r_margin=>1 +0); 55 my @data = ( 56 [ @dates ], 57 [ @levels ], 58 [ @overflow ], 59 [ @low1992 ], 60 ); 61 62 my @legend = ( 'Lake Elevation', 'Overflow to Stump Lake', 'La +ke Level in 1992' ); 63 $graph->set_legend(@legend); 64 65 $graph->set ( 66 title => "05056500 Devils Lake near Devils Lake, North + Dakota", 67 x_label => "1867 to Present", 68 y_label => "Elevation (feet)", 69 y_max_value => 1455.00, 70 y_min_value => 1400.00, 71 y_tick_number => 11, 72 ); 73 74 binmode STDOUT; 75 76 my $image_name = "dvl_POR.gif"; 77 78 # Output the graph 79 $graph->plot_to_gif($image_name, \@data ); 80 81 print "$image_name was created."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GIFGraph and undefined values
by crenz (Priest) on Apr 02, 2003 at 18:04 UTC | |
by kryberg (Pilgrim) on Apr 02, 2003 at 19:39 UTC | |
|
Re: GIFGraph and undefined values
by blokhead (Monsignor) on Apr 02, 2003 at 18:14 UTC | |
by kryberg (Pilgrim) on Apr 02, 2003 at 20:07 UTC |