gnuplot学习笔记

先扔两个个人认为比较有用的references:

http://blog.chinaunix.net/u3/109940/showart_2215499.html

http://blog.chinaunix.net/u/18816/showart_152237.html

 

还有就是找到一个可以实时输出plot的一个perl代码的网站:http://users.softlab.ntua.gr/~ttsiod/gnuplotStreaming.html

 

下面是我看gnuplot doc的时候做的一些笔记:

1. 3 types of plot cmds:
    plot --> 2D plot
    splot --> 3D plot
    replot --> appends the arguments to the previous plot or splot.

    general invocation:
    plot {<range>} {<iteration>}
        <function>|"<datafile>" {file-modifier}
        {<axes>} {<title-spec>} {with <style>}
        , ....
    ;; using comma to separate different functions.

    several keywords:
    volatile -> the data read in will change in the future, so if gnuplot
want the reproduce the same plot as before, it will use the data already read
in instead of re-read again the data.

2. comments: # precedes the actual comment.

3. coordinates of plot:
    {<system>} <x>,{<system>} <y> {,{<system>} <z>}
    system --> first: uses left and bottom axes
          `--> second: uses top and right axes
          `--> graph: specifies the area within the axes, ranging from
          |        0 to 1.
          `--> screen: whole area of the screan(Windows).
          `--> character: coor in char's width and height.

4. expression: any expr accepted by C, FORTRAN, Pascal or BASIC is valid. White space in between will be ignored.
    complex number: {<real>, <imag>}  e.g: {1, 2} ==> 1 + 2i
    string containing numerical value will be converted to the corresponding numerical value. e.g: "12" + 1 ==> 12 + 1

5. function: same as the unix C math lib, but accepting real, integer and complex number.

6. operators: same as the C ops.
    ** ==> square operator
    , ==> serial eval, return the right most expr.
         e.g: (a, b) # first eval a, then b.
    . ==> string concatenate e.g: a.b
    eq ==> string eq
    ne ==> string ne

7. line type: when plotting, you can specify the line type the plot uses.
    e.g: plot sin(x) linetype 4
         plot sin(x) lt -1
    specify the line color
    e.g: plot sin(x) linecolor 3
         plot sin(x) lc 3

8. string var: var = "hello"
    substr ==> var[2:3] [begin:end]
    var[:] or var[*:*] ==> whole string.

9. data file: data file containing point or other things can be used in plots'
cmd. Each field should be separated by white spaces.

    Specifying the reading format of the data file:
    plot 'file' using {<entry> ...} {'format'}
    ;; if the format field if specified, each line(record) will be parsed
by the C library's scanf function, with the specified format string.

10. execute commands contained in the file
    gnuplot file1 file2 ...
    execute the commands in the files in the specified order, and exit
afterwards.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值