sample52.pl
上传用户:shbosideng
上传日期:2013-05-04
资源大小:1555k
文件大小:1k
源码类别:

SNMP编程

开发平台:

C/C++

  1. use GIFgraph::lines;
  2. print STDERR "Processing sample 5-2n";
  3. # The reverse is in here, because I thought the falling line was 
  4. # depressing, but I was too lazy to retype the data set
  5. @data = ( 
  6.     [ qw( Jan Feb Mar Apr May Jun Jul Aug Sep ) ],
  7.     [ reverse(4, 3, 5, 6, 3,  1.5, -1, -3, -4)]
  8. );
  9. $my_graph = new GIFgraph::lines();
  10. $my_graph->set( 
  11. x_label => 'Month',
  12. y_label => 'Measure of success',
  13. title => 'A Simple Line Graph',
  14. y_max_value => 8,
  15. y_min_value => -6,
  16. y_tick_number => 14,
  17. y_label_skip => 2,
  18. box_axis => 0,
  19. line_width => 3,
  20. zero_axis_only => 1,
  21. x_label_position => 1,
  22. y_label_position => 1,
  23. );
  24. $my_graph->plot_to_gif( "sample52.gif", @data );
  25. exit;