Chinaunix首页 | 论坛 | 博客
  • 博客访问: 766076
  • 博文数量: 217
  • 博客积分: 2401
  • 博客等级: 大尉
  • 技术积分: 2030
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-16 06:58
个人简介

怎么介绍?

文章分类

全部博文(217)

文章存档

2023年(2)

2022年(3)

2021年(29)

2020年(12)

2019年(5)

2018年(5)

2017年(5)

2016年(3)

2015年(6)

2014年(12)

2013年(16)

2012年(9)

2011年(6)

2010年(15)

2009年(30)

2008年(59)

我的朋友

分类:

2008-11-21 09:14:27

1. Install Chart::Graph::Gnuplot
2. ~caidaperl/Chart-Graph-3.2/Graph/Gnuplot.pm
3. in Perl:

 use Chart::Graph::Gnuplot qw(&gnuplot);



 gnuplot(\%global_options, [\%data_set_options, \@matrix],
                           [\%data_set_options, \@x_column, \@y_column],
                           [\%data_set_options, < filename >], ... );

The following example illustrates most of the general capabilities of Chart::Graph::Gnuplot. It creates the output file gnuplot1.png. in the png graphics format. The data is coming from all three sources. The first data source is a matrix, the second is a column, and the last is an external data file.

  use Chart::Graph::Gnuplot qw(gnuplot);

  gnuplot({'title' => 'foo',
           'x2-axis label' => 'bar',
           'logscale x2' => '1',
           'logscale y' => '1',
           'output type' => 'png',
           'output file' => 'gnuplot1.png',
           'xtics' => [ ['small\nfoo', 10], ['medium\nfoo', 20], ['large\nfoo', 30] ],
           'ytics' => [10,20,30,40,50],
           'extra_opts' => 'set key left top Left'},
          [{'title' => 'data1',
            'type' => 'matrix'}, [[1, 10],
                                  [2, 20],
                                  [3, 30]] ],
          [{'title' => 'data2',
            'style' => 'lines',
            'type' => 'columns'}, [8, 26, 50, 60, 70],
                                  [5, 28, 50, 60, 70] ],
          [{'title' => 'data3',
            'style' => 'lines',
            'type' => 'file'}, './samplefile'],);
阅读(957) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~