zoukankan      html  css  js  c++  java
  • gnuplot画折线图

    之前尝试用jfreechart画自定义横坐标的折线图或时序图,发现很复杂,后来改用gnuplot了。

    gnuplot在网上一搜就能找到下载地址。

    安装完成后,主要是命令行形式的交互界面,至少比jfreechart进步一些...

    set xrange [0:240]  #设置x轴范围

    set yrange [1:1.5]  #设置y轴范围

    set xtics ("0" 0, "60" 60, "120" 120, "180" 180, "240" 240) #设置x轴显示的坐标,引号内的内容是显示时的标度,没有打引号的是真实的度量

    plot 'data.txt' with linespoints #将data.txt里的数据读出并画成折线图

    data.txt:

    0 1.153
    1 1.211
    2 1.211
    3 1.217
    4 1.212
    5 1.218
    6 1.148
    7 1.214
    8 1.215
    9 1.217
    ……

    更多选项可以参见http://hi.baidu.com/syc_china/item/a05b5d936d31e836326eeb18

    正在摸索如何将输出的图片转化为pdf格式或位图格式。

  • 相关阅读:
    web.xml
    web.xml hello1代码分析
    annotation
    injection
    container
    build tool
    version control
    url与uri的区别
    函数式语言
    http协议解析过程
  • 原文地址:https://www.cnblogs.com/winstonet/p/6916118.html
Copyright © 2011-2022 走看看