home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume8 / gnuplot1.10A / part06 / docs / gnuplot.doc next >
Encoding:
Text File  |  1989-09-09  |  26.9 KB  |  1,453 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                  GNUPLOT
  24.              An    Interactive Plotting Program
  25.  
  26.  
  27.  
  28.               Thomas Williams &    Colin Kelley
  29.  
  30.           Department of    Electrical Engineering
  31.                Villanova University
  32.                Villanova, PA  19085
  33.                    May 26, 1989
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                    May 26, 1989
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.                  _I_N_T_R_O_D_U_C_T_I_O_N
  81.  
  82.    GNUPLOT is a    command-driven interactive function plotting program.
  83.    It is case sensitive    (commands and function names written in    lower-
  84.    case    are not    the same as those written in CAPS).  All command names
  85.    may be abbreviated, as long as the abbreviation is not ambiguous.
  86.    Any number of commands may appear on    a line,    separated by semicolons
  87.    (;).
  88.  
  89.  
  90.  
  91.  
  92.    _1.  _c_l_e_a_r
  93.  
  94.  
  95.    This    command    erases the current screen or output device as specified
  96.    by 'set output'.  This usually generates a formfeed on hardcopy dev-
  97.    ices.  Use 'set terminal' to    set the    device type.
  98.  
  99.  
  100.  
  101.  
  102.    _2.  _e_x_i_t
  103.  
  104.  
  105.    'exit', 'quit' and your computer's END-OF-FILE character will exit
  106.    GNUPLOT.  All these commands    will clear the output device (as the
  107.    'clear' command does) before    exiting.
  108.  
  109.  
  110.  
  111.  
  112.    _3.  _e_x_p_r_e_s_s_i_o_n_s
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.     _3._1.  _f_u_n_c_t_i_o_n_s
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                    May 26, 1989
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.                  GNUPLOT             Page 2
  138.  
  139.  
  140.          _3._1._1.  _a_b_s
  141.  
  142.  
  143.          This function returns the absolute    value of its argument.
  144.          The returned value    is of the same type as the argument.
  145.  
  146.          For complex arguments, abs(x) is defined as the length of
  147.          x in the complex plane [i.e.  sqrt(real(x)**2 +
  148.          imag(x)**2) ].
  149.  
  150.  
  151.  
  152.          _3._1._2.  _a_c_o_s
  153.  
  154.  
  155.          This function returns the arc cosine (inverse cosine) of
  156.          its argument.  'acos' returns its argument    in radians.
  157.  
  158.  
  159.  
  160.          _3._1._3.  _a_r_g
  161.  
  162.  
  163.          This function returns the phase of    a complex number, in
  164.          radians.
  165.  
  166.  
  167.  
  168.          _3._1._4.  _a_s_i_n
  169.  
  170.  
  171.          This function returns the arc sin (inverse    sin) of    its
  172.          argument.    'asin' returns its argument in radians.
  173.  
  174.  
  175.  
  176.          _3._1._5.  _a_t_a_n
  177.  
  178.  
  179.          This function returns the arc tangent (inverse tangent) of
  180.          its argument.  'atan' returns its argument    in radians.
  181.  
  182.  
  183.  
  184.          _3._1._6.  _b_e_s_j_0
  185.  
  186.  
  187.          This function returns the j0th Bessel function of its
  188.          argument.    'besj0'    expects    its argument to    be in radians.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                    May 26, 1989
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.                  GNUPLOT             Page 3
  204.  
  205.  
  206.          _3._1._7.  _b_e_s_j_1
  207.  
  208.  
  209.          This function returns the j1st Bessel function of its
  210.          argument.    'besj1'    expects    its argument to    be in radians.
  211.  
  212.  
  213.  
  214.          _3._1._8.  _b_e_s_y_0
  215.  
  216.  
  217.          This function returns the y0th Bessel function of its
  218.          argument.    'besy0'    expects    its argument to    be in radians.
  219.  
  220.  
  221.  
  222.          _3._1._9.  _b_e_s_y_1
  223.  
  224.  
  225.          This function returns the y1st Bessel function of its
  226.          argument.    'besy1'    expects    its argument to    be in radians.
  227.  
  228.  
  229.  
  230.          _3._1._1_0.  _c_e_i_l
  231.  
  232.  
  233.          This function returns the largest integer not less    than
  234.          its argument.  For    complex    numbers, 'ceil'    returns    the
  235.          largest integer not less than the real part of its    argu-
  236.          ment.
  237.  
  238.  
  239.  
  240.          _3._1._1_1.  _c_o_s
  241.  
  242.  
  243.          This function returns the cosine of its argument.    'cos'
  244.          expects its argument to be    in radians.
  245.  
  246.  
  247.  
  248.          _3._1._1_2.  _c_o_s_h
  249.  
  250.  
  251.          This function returns the hyperbolic cosine of its    argu-
  252.          ment.  'cosh' expects its argument    to be in radians.
  253.  
  254.  
  255.  
  256.          _3._1._1_3.  _e_x_p
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                    May 26, 1989
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.                  GNUPLOT             Page 4
  270.  
  271.  
  272.          This function returns the exponential function of its
  273.          argument (e raised    to the power of    its argument).
  274.  
  275.  
  276.  
  277.          _3._1._1_4.  _f_l_o_o_r
  278.  
  279.  
  280.          This function returns the smallest    integer    not greater
  281.          than its argument.     For complex numbers, 'floor' returns
  282.          the smallest integer not greater than the real part of its
  283.          argument.
  284.  
  285.  
  286.  
  287.          _3._1._1_5.  _i_m_a_g
  288.  
  289.  
  290.          This function returns the imaginary part of its argument
  291.          as    a real number.
  292.  
  293.  
  294.  
  295.          _3._1._1_6.  _i_n_t
  296.  
  297.  
  298.          This function returns the integer part of its argument,
  299.          truncated toward zero.
  300.  
  301.  
  302.  
  303.          _3._1._1_7.  _l_o_g
  304.  
  305.  
  306.          This function returns the natural logarithm (base e) of
  307.          its argument.
  308.  
  309.  
  310.  
  311.          _3._1._1_8.  _l_o_g_1_0
  312.  
  313.  
  314.          This function returns the logarithm (base 10) of its argu-
  315.          ment.
  316.  
  317.  
  318.  
  319.          _3._1._1_9.  _r_e_a_l
  320.  
  321.  
  322.          This function returns the real part of its    argument.
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                    May 26, 1989
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.                  GNUPLOT             Page 5
  336.  
  337.  
  338.          _3._1._2_0.  _s_g_n
  339.  
  340.  
  341.          This function returns 1 if    its argument is    positive, -1 if
  342.          its argument is negative, and 0 if    its argument is    0.  If
  343.          the argument is a complex value, the imaginary component
  344.          is    ignored.
  345.  
  346.  
  347.  
  348.          _3._1._2_1.  _s_i_n
  349.  
  350.  
  351.          This function returns the sine of its argument.  'sin'
  352.          expects its argument to be    in radians.
  353.  
  354.  
  355.  
  356.          _3._1._2_2.  _s_i_n_h
  357.  
  358.  
  359.          This function returns the hyperbolic sine of its argument.
  360.          'sinh' expects its    argument to be in radians.
  361.  
  362.  
  363.  
  364.          _3._1._2_3.  _s_q_r_t
  365.  
  366.  
  367.          This function returns the square root of its argument.
  368.  
  369.  
  370.  
  371.          _3._1._2_4.  _t_a_n
  372.  
  373.  
  374.          This function returns the tangent of its argument.     'tan'
  375.          expects its argument to be    in radians.
  376.  
  377.  
  378.  
  379.          _3._1._2_5.  _t_a_n_h
  380.  
  381.  
  382.          This function returns the hyperbolic tangent of its argu-
  383.          ment.  'tanh' expects its argument    to be in radians.
  384.  
  385.  
  386.  
  387.     _3._2.  _o_p_e_r_a_t_o_r_s
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.                    May 26, 1989
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.                  GNUPLOT             Page 6
  402.  
  403.  
  404.          _3._2._1.  _b_i_n_a_r_y
  405.  
  406.  
  407.          The following is a    list of    all the    binary operators and
  408.          their usages:
  409.  
  410.           Symbol         Example          Explanation
  411.            **          a**b           exponentiation
  412.            *          a*b           multiplication
  413.            /          a/b           division
  414.            %          a%b         * modulo
  415.            +          a+b           addition
  416.            -          a-b           subtraction
  417.            ==          a==b           equality
  418.            !=          a!=b           inequality
  419.            &          a&b         * bitwise and
  420.            ^          a^b         * bitwise exclusive or
  421.            |          a|b         * bitwise inclusive or
  422.            &&          a&&b         * logical and
  423.            ||          a||b         * logical or
  424.            ?:          a?b:c         * ternary operation
  425.  
  426.          (*) Starred explanations indicate that the    operator
  427.          requires integer arguments.
  428.  
  429.          Logical AND (&&) and OR (||) short-circuit    the way    they do
  430.          in    C.  That is, the second    && operand is not evaluated if
  431.          the first is false; the second || operand is not evaluated
  432.          if    the first is true.
  433.  
  434.          The ternary operator evaluates its    first argument (a).  If
  435.          it    is true    (non-zero) the second argument (b) is evaluated
  436.          and returned, otherwise the third argument    (c) is
  437.          evaluated and returned.
  438.  
  439.  
  440.  
  441.          _3._2._2.  _u_n_a_r_y
  442.  
  443.  
  444.          The following is a    list of    all the    unary operators    and
  445.          their usages:
  446.  
  447.           Symbol         Example          Explanation
  448.            -          -a           unary minus
  449.            ~          ~a         * one's complement
  450.            !          !a         * logical negation
  451.            !          a!         * factorial
  452.  
  453.          (*) Starred explanations indicate that the    operator
  454.          requires an integer argument.
  455.  
  456.          The factorial operator returns a real number to allow a
  457.  
  458.  
  459.  
  460.                    May 26, 1989
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.                  GNUPLOT             Page 7
  468.  
  469.  
  470.          greater range.
  471.  
  472.  
  473.  
  474.  
  475.    _4.  _h_e_l_p
  476.  
  477.  
  478.    The 'help' command displays on-line help.  To specify information on
  479.    a particular    topic use the syntax:
  480.  
  481.        help <topic>
  482.  
  483.    Help    is actually a separate program.     If help doesn't work for you,
  484.    ask your administrator how to set up    the GNUHELP environment    vari-
  485.    able    (and possibly the HELPDIR environment variable).
  486.  
  487.    You may exit    the help utility and return to GNUPLOT by either press-
  488.    ing <Return>(s) at the 'HELP    >' prompt or pressing your computer's
  489.    END-OF-FILE character at any    help prompt.
  490.  
  491.  
  492.  
  493.  
  494.    _5.  _l_o_a_d
  495.  
  496.  
  497.    This    command    executes each line of the specified input file as if it
  498.    had been typed in interactively.  Files created by the 'save' com-
  499.    mand    can later be 'load'ed.    Any text file containing valid commands
  500.    can be created and then executed by the 'load' command.  Files being
  501.    'load'ed may    themselves contain 'load' commands.  Lines beginning
  502.    with    # (or !     if using VMS) will be treated as comments and ignored.
  503.  
  504.    The 'load' command must be the last command on the line.
  505.  
  506.    Syntax:
  507.        load    <input-file>
  508.  
  509.    The name of the input file must be enclosed in quotes.
  510.  
  511.    Examples:
  512.  
  513.        load    'work.gnu'
  514.        load    "func.dat"
  515.  
  516.  
  517.  
  518.  
  519.    _6.  _p_a_u_s_e
  520.  
  521.  
  522.    Pause is useful in conjunction with `load` files.  The command
  523.  
  524.  
  525.  
  526.                    May 26, 1989
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.                  GNUPLOT             Page 8
  534.  
  535.  
  536.    'pause' displays any    text associated    with the command and then waits
  537.    the specified amount    of time.  This allows one to build a 'load'
  538.    file    and control the    amount of time a finished graph    is displayed.
  539.    The first argument is an expression that can    be -1, 0, 1, 2,    ...  -1
  540.    will    wait until a carriage return is    hit.  0    won't pause at all, and
  541.    1, 2, etc. will wait    the specified number of    seconds.
  542.  
  543.    Note: Since pause is    not part of the    plot it    may interact with dif-
  544.    ferent device drivers differently (depending    upon how text and
  545.    graphics are    mixed).
  546.  
  547.    Examples:
  548.        pause -1    ! Wait until a carriage return is hit
  549.        pause 3     ! Wait three seconds
  550.        pause -1  "Hit return to continue"
  551.        pause 10  "Isn't this pretty?  It's a cubic-spline."
  552.  
  553.    Syntax:
  554.        pause <expression> ["string"]
  555.  
  556.  
  557.  
  558.  
  559.    _7.  _p_l_o_t
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.     _7._1.  _d_a_t_a__f_i_l_e
  567.  
  568.  
  569.     Discrete data contained    in a file can displayed    by specifying
  570.     the name of the    data file (enclosed in quotes) on the 'plot'
  571.     command    line.
  572.  
  573.     Data files should contain one data point per line.  A data
  574.     point may be specified either as an X and Y value separated by
  575.     blank space, or    as just    the Y value, in    which case the program
  576.     will use the number of the coordinate as the X value.  Coordi-
  577.     nate numbers starts at 0 and are incremented for each data
  578.     point read.  Blank lines and lines beginning with # will be
  579.     treated    as comments and    ignored.
  580.  
  581.  
  582.     This example compares the data in the file population.dat to a
  583.     theoretical curve:
  584.  
  585.         pop(x) = 103*exp((1965-x)/10)
  586.         plot [1960:1990] 'population.dat', pop(x)
  587.  
  588.     The file population.dat    might contain:
  589.  
  590.  
  591.  
  592.                    May 26, 1989
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.                  GNUPLOT             Page 9
  600.  
  601.  
  602.      # Gnu population in Antarctica    since 1965
  603.      1965    103
  604.      1970    55
  605.      1975    34
  606.      1980    24
  607.      1985    10
  608.  
  609.  
  610.  
  611.     _7._2.  _r_a_n_g_e_s
  612.  
  613.  
  614.     This option specifies the region of the    plot which will    be
  615.     displayed.
  616.  
  617.     Ranges may be provided on the 'plot' command line as synonyms
  618.     for the    'set xrange' and 'set yrange' commands.
  619.  
  620.     Syntax:
  621.         [{dummy-var =} {xmin : xmax}] {    [{ymin : ymax}]    }
  622.  
  623.     Where dummy-var    is the independent variable (the default is
  624.     'x', but this may be changed with the 'set dummy' command) and
  625.     the min    and max    terms can be expressions or constants.
  626.  
  627.     Both the min and max terms are optional.  The ':' is also
  628.     optional if neither a min nor a    max term is specified.    This
  629.     allows '[]' to be used as a null range specification.
  630.  
  631.     Specifying a Y range turns autoscaling OFF.
  632.  
  633.  
  634.     Examples:
  635.  
  636.     This uses current ranges:
  637.         plot cos(x)
  638.  
  639.     This sets the xrange only:
  640.         plot [-10:30] sin(pi*x)/(pi*x)
  641.  
  642.     This is    the same, but uses t as    the dummy-variable:
  643.         plot [t    = -10 :30]  sin(pi*t)/(pi*t)
  644.  
  645.     This sets both the x and yranges:
  646.         plot [-pi:pi] [-3:3]  tan(x), 1/x
  647.  
  648.     This sets only the yrange:
  649.         plot []    [-2:sin(5)*-8] sin(x)**besj0(x)
  650.  
  651.     This sets xmax and ymin    only:
  652.         plot [:200] [-pi:]  exp(sin(x))
  653.  
  654.  
  655.  
  656.  
  657.  
  658.                    May 26, 1989
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.                  GNUPLOT            Page 10
  666.  
  667.  
  668.     _7._3.  _s_t_y_l_e
  669.  
  670.  
  671.     Plots may be displayed in one of three styles: 'lines',
  672.     'points', or 'impulses'.  The 'lines' style connects adjacent
  673.     points with lines. The 'points'    style displays a small symbol
  674.     at each    point.    The 'impulses' style displays a    vertical line
  675.     from the X axis    to each    point.
  676.  
  677.     Default    styles are chosen with the 'set    function style'    and
  678.     'set data style' commands.
  679.  
  680.     Syntax:
  681.         with <style>
  682.  
  683.     Where <style> is one of    'lines', 'points', or 'impulses'.
  684.     These keywords may be abbreviated.
  685.  
  686.  
  687.     Examples:
  688.  
  689.     This plots sin(x) with impulses:
  690.         plot sin(x) with impulses
  691.  
  692.     This plots sin(x) with points, cos(x) default:
  693.         plot [-9:30]  sin(x) w points, cos(x)
  694.  
  695.     This plots tan(x) with the default function style, "data.1"
  696.     with lines:
  697.         plot []    [-2:5] tan(x), "data.1"    with l
  698.  
  699.     This plots "leastsq.dat" with impulses:
  700.         plot 'leastsq.dat' w i
  701.  
  702.  
  703.  
  704.  
  705.    _8.  _p_r_i_n_t
  706.  
  707.  
  708.    This    command    prints the value of <expression> to the    screen.
  709.  
  710.    Syntax:
  711.        print <expression>
  712.  
  713.    See 'expressions'.
  714.  
  715.  
  716.  
  717.  
  718.    _9.  _q_u_i_t
  719.  
  720.  
  721.  
  722.  
  723.  
  724.                    May 26, 1989
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.                  GNUPLOT            Page 11
  732.  
  733.  
  734.    'quit' is a synonym for 'exit'.  See    'exit'.
  735.  
  736.  
  737.  
  738.  
  739.    _1_0.    _r_e_p_l_o_t
  740.  
  741.  
  742.    'replot' repeats the    last 'plot' command.  This can be useful for
  743.    viewing a plot with different 'set' options,    or when    generating the
  744.    same    plot for several devices.
  745.  
  746.  
  747.  
  748.  
  749.    _1_1.    _s_a_v_e
  750.  
  751.  
  752.    This    command    saves either user-defined functions, variables,    or both
  753.    to the specified file.
  754.  
  755.    Syntax:
  756.        save     {option} <filename>
  757.  
  758.    Where <option> is either 'functions'    or 'variables'.     If no option
  759.    is used GNUPLOT saves both functions    and variables.
  760.  
  761.    'save'd files are written in    text format and    may be read by the
  762.    'load' command.
  763.  
  764.    The filename    must be    enclosed in quotes.
  765.  
  766.    Examples:
  767.  
  768.        save    "work.gnu"
  769.        save    functions 'func.dat'
  770.        save    var 'var.dat'
  771.  
  772.  
  773.  
  774.  
  775.    _1_2.    _s_e_t-_s_h_o_w
  776.  
  777.  
  778.    Set or show various internal    gnuplot    settings.
  779.  
  780.  
  781.  
  782.  
  783.     _1_2._1.  _a_l_l
  784.  
  785.  
  786.     The command 'show all' will display all    the set-show options
  787.  
  788.  
  789.  
  790.                    May 26, 1989
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.                  GNUPLOT            Page 12
  798.  
  799.  
  800.     currently in effect.
  801.  
  802.     Syntax:
  803.         show all
  804.  
  805.  
  806.  
  807.     _1_2._2.  _a_u_t_o_s_c_a_l_e
  808.  
  809.  
  810.     If autoscaling is set, the Y axis is automatically scaled to
  811.     fit the    range of the function or data being plotted.  If autos-
  812.     caling is not set, the current Y range is used.     See 'set
  813.     yrange'.
  814.  
  815.     Syntax:
  816.         set autoscale
  817.         set noautoscale
  818.         show autoscale
  819.  
  820.  
  821.  
  822.     _1_2._3.  _d_u_m_m_y
  823.  
  824.  
  825.     By default, GNUPLOT assumes that the independent variable is
  826.     'x' on the 'plot' command line.     'x' is    called the dummy vari-
  827.     able because it    is just    a notation to indicate the independent
  828.     variable.  The 'set dummy' command changes this    default    dummy
  829.     variable name.    For example, you may find it more convenient to
  830.     call the dummy variable    't' when plotting time functions:
  831.  
  832.         set dummy t
  833.         plot sin(t), cos(t)
  834.  
  835.     Syntax:
  836.         set dummy <dummy-var>
  837.         show dummy
  838.  
  839.  
  840.  
  841.     _1_2._4.  _f_u_n_c_t_i_o_n_s
  842.  
  843.  
  844.     The 'show functions' command lists all user-defined functions
  845.     and their definitions.
  846.  
  847.     Syntax:
  848.         show functions
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.                    May 26, 1989
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.                  GNUPLOT            Page 13
  864.  
  865.  
  866.     _1_2._5.  _l_o_g_s_c_a_l_e
  867.  
  868.  
  869.     Log scaling may    be set on the X    and/or Y axis.
  870.  
  871.     Syntax:
  872.         set logscale <axes>
  873.         set nologscale
  874.         show logscale
  875.  
  876.     Where <axes> is    either 'x', 'y', or 'xy'.
  877.  
  878.  
  879.  
  880.     _1_2._6.  _p_o_l_a_r
  881.  
  882.  
  883.     The 'set polar'    command    changes    the meaning of the plot    from
  884.     rectangular coordinates    to polar coordinates.  In polar    coordi-
  885.     nates, the dummy variable (x) is an angle.  The    domain of this
  886.     angle is changed from whatever it was to [0:2*pi].
  887.  
  888.     The command 'set nopolar' changes the meaning of the plot back
  889.     to the default rectangular coordinate system.  The domain of x
  890.     is changed from    whatever it was    to [-10:10].
  891.  
  892.     While in polar coordinates the meaning of an expression    in x is
  893.     really r = f(x), where x is an angle of    rotation.  The plot,
  894.     however, is plotted on a rectangular grid.  Thus the displayed
  895.     ranges of x and    y are rectanglar values, while the command 'set
  896.     xrange'    refers to polar    values.
  897.  
  898.     Syntax:
  899.         set polar
  900.          set nopolar          show polar
  901.  
  902.  
  903.  
  904.     _1_2._7.  _o_f_f_s_e_t_s
  905.  
  906.  
  907.     The amount of the graph    that the plot takes up may be con-
  908.     trolled    to some    extent with the    'set offsets' command.    This
  909.     command    takes four arguments--left offset, right offset, top
  910.     offset and bottom offset.  By default, each offset is 0.  Left
  911.     and right offsets are given in units of    the x axis, while top
  912.     and bottom offsets are given in    units of the y axis.  The plot
  913.     of sin(x), displayed with offsets of 0,    0, 2, 2    will take up
  914.     1/3 of the displayed y axis.  Offsets are particularly useful
  915.     with polar coordinates as a means of compensating for aspect
  916.     ratio distortion.
  917.  
  918.     Syntax:
  919.  
  920.  
  921.  
  922.                    May 26, 1989
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.                  GNUPLOT            Page 14
  930.  
  931.  
  932.         set offsets <expr>, <expr>, <expr>, <expr>
  933.         show offsets
  934.  
  935.  
  936.  
  937.     _1_2._8.  _o_u_t_p_u_t
  938.  
  939.  
  940.     By default, plots are displayed    to the standard    output.     The
  941.     'set output' command redirects the displays to the specified
  942.     file or    device.
  943.  
  944.     Syntax:
  945.         set output {filename}
  946.         show output
  947.  
  948.     The filename must be enclosed in quotes.  If the filename is
  949.     omitted, output    will be    sent to    the standard output.
  950.  
  951.  
  952.  
  953.     _1_2._9.  _s_a_m_p_l_e_s
  954.  
  955.  
  956.     The sampling rate of functions may be changed by the 'set sam-
  957.     ples' command.    By default, sampling is    set to 160 points.  A
  958.     higher sampling    rate will produce more accurate    plots, but will
  959.     take longer.  In generating plots, GNUPLOT will    use either the
  960.     sampling rate set or the resolution of the current output dev-
  961.     ice, whichever is lower.
  962.  
  963.     Syntax:
  964.         set samples <expression>
  965.         show samples
  966.  
  967.  
  968.  
  969.     _1_2._1_0.    _s_t_y_l_e
  970.  
  971.  
  972.     Plots may be displayed in one of three styles: 'lines',
  973.     'points', or 'impulses'.  The 'lines' style connects adjacent
  974.     points with lines. The 'points'    style displays a small symbol
  975.     at each    point.    The 'impulses' style displays a    vertical line
  976.     from the X axis    to each    point.
  977.  
  978.     Default    styles are chosen with the 'set    function style'    and
  979.     'set data style' commands.  See    'plot' for information about
  980.     how to override    the default plotting style for individual func-
  981.     tions.
  982.  
  983.     Syntax:
  984.         set function style <style>
  985.  
  986.  
  987.  
  988.                    May 26, 1989
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.                  GNUPLOT            Page 15
  996.  
  997.  
  998.         set data style <style>
  999.         show function style
  1000.         show data style
  1001.  
  1002.     Where style is either 'lines', 'points', or 'impulses'.
  1003.  
  1004.  
  1005.  
  1006.     _1_2._1_1.    _t_e_r_m_i_n_a_l
  1007.  
  1008.  
  1009.     GNUPLOT    supports many different    graphics devices.  Use the 'set
  1010.     terminal' command to select the    type of    device for which GNU-
  1011.     PLOT will produce output.   While your installation may    not
  1012.     include    all of these, the following were available in the
  1013.     source code at the time    this help file was written:
  1014.  
  1015.     Machines:  IBM-PC's (ega, cga, hercules), ATT6300, CORONA325,
  1016.            UNIXPC (att7300 or 3b1);
  1017.     Terminals: AED512, AED767, HP2623A, HP7580B, REGIS, SELENAR,
  1018.            TEK40xx, BBN    Bitgraph;
  1019.     Printers:  LASERJET1, LASERJET2, LASERJET3, POSTSCRIPT,    QMS,
  1020.            VECTRIX384;
  1021.     Other:       UNIXPLOT.
  1022.  
  1023.     Syntax:
  1024.         set terminal {terminal-type}
  1025.         show terminal
  1026.  
  1027.     If <terminal-type> is omitted, GNUPLOT will list the available
  1028.     terminal types.     <terminal-type> may be    abbreviated.
  1029.  
  1030.     Use 'set output' to redirect this output to a file or device.
  1031.  
  1032.  
  1033.  
  1034.     _1_2._1_2.    _v_a_r_i_a_b_l_e_s
  1035.  
  1036.  
  1037.     The 'show variables' command lists all user-defined variables
  1038.     and their values.
  1039.  
  1040.     Syntax:
  1041.         show variables
  1042.  
  1043.  
  1044.  
  1045.     _1_2._1_3.    _v_e_r_s_i_o_n
  1046.  
  1047.  
  1048.     Show the current version of gnuplot.  This is the same text
  1049.     that appears when gnuplot starts up.  (There is    no SET VERSION
  1050.     command, of course.)
  1051.  
  1052.  
  1053.  
  1054.                    May 26, 1989
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.                  GNUPLOT            Page 16
  1062.  
  1063.  
  1064.     Syntax:        SHOW VERSION
  1065.  
  1066.  
  1067.  
  1068.     _1_2._1_4.    _x_r_a_n_g_e
  1069.  
  1070.  
  1071.     The 'set xrange' command sets the horizontal range which will
  1072.     be displayed.
  1073.  
  1074.     This range may also be specified on the    'plot' command line.
  1075.  
  1076.     Syntax:
  1077.         set xrange [{xmin : xmax}]
  1078.  
  1079.     Where <xmin> and <xmax>    terms are expressions or constants.
  1080.  
  1081.     Both the <xmin>    and <xmax> terms are optional.
  1082.  
  1083.  
  1084.  
  1085.     _1_2._1_5.    _y_r_a_n_g_e
  1086.  
  1087.  
  1088.     The 'set yrange' command sets the vertical range which will be
  1089.     displayed.  This command turns autoscaling OFF.
  1090.  
  1091.     This range may also be specified on the    'plot' command line.
  1092.  
  1093.     Syntax:
  1094.         set yrange [{ymin : ymax}]
  1095.  
  1096.     Where <ymin> and <ymax>    terms are expressions or constants.
  1097.  
  1098.     Both the <ymin>    and <ymax> terms are optional.
  1099.  
  1100.  
  1101.  
  1102.     _1_2._1_6.    _z_e_r_o
  1103.  
  1104.  
  1105.     GNUPLOT    will not plot a    point if its imaginary part is greater
  1106.     in magnitude than the 'zero' threshold.     The default 'zero'
  1107.     value is 1e-8.
  1108.  
  1109.     Syntax:
  1110.         set zero <expression>
  1111.         show zero
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.                    May 26, 1989
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.                  GNUPLOT            Page 17
  1128.  
  1129.  
  1130.    _1_3.    _s_h_e_l_l
  1131.  
  1132.  
  1133.    The 'shell' command spawns an interactive shell.  To    return to GNU-
  1134.    PLOT, type 'logout' if using    VMS, 'exit' or your END-OF-FILE    charac-
  1135.    ter if using    Unix, or 'exit'    if using MS-DOS.
  1136.  
  1137.    A single shell command may be spawned by preceding it with the !
  1138.    character ($    if using VMS) at the beginning of a command line.  Con-
  1139.    trol    will return immediately    to GNUPLOT after this command is exe-
  1140.    cuted.  For example,
  1141.  
  1142.     ! dir
  1143.  
  1144.    prints a directory listing and then returns to GNUPLOT.
  1145.  
  1146.  
  1147.  
  1148.  
  1149.    _1_4.    _s_t_a_r_t__u_p
  1150.  
  1151.  
  1152.    When    GNUPLOT    is run,    it looks for an    initialization file to load.
  1153.    This    file is    called '.gnuplot' on Unix systems, and 'GNUPLOT.INI' on
  1154.    other systems.  If this file    is not found in    the current directory,
  1155.    the program will look for it    in your    home directory (under MS-DOS,
  1156.    the environment variable GNUPLOT should contain the name of this
  1157.    directory).
  1158.  
  1159.    If this file    is found, GNUPLOT executes the commands    in this    file.
  1160.    This    is most    useful for setting your    terminal type and defining any
  1161.    functions or    variables which    you use    often.    The variable 'pi' is
  1162.    already defined for you.
  1163.  
  1164.  
  1165.  
  1166.  
  1167.    _1_5.    _s_u_b_s_t_i_t_u_t_i_o_n
  1168.  
  1169.  
  1170.    Command-line    substitution is    specified by a system command enclosed
  1171.    in backquotes (`).  This command is spawned and the output it pro-
  1172.    duces replaces the name of the command (and backquotes) on the com-
  1173.    mand    line.
  1174.  
  1175.    Newlines in the output produced by the spawned command are replaced
  1176.    with    blanks.
  1177.  
  1178.    Command-line    substitution can be used anywhere on the GNUPLOT com-
  1179.    mand    line.
  1180.  
  1181.  
  1182.    Example:
  1183.  
  1184.  
  1185.  
  1186.                    May 26, 1989
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.                  GNUPLOT            Page 18
  1194.  
  1195.  
  1196.    This    will run the program 'leastsq' and substitute `leastsq`    on the
  1197.    command line    with its output:
  1198.  
  1199.     f(x) = `leastsq`
  1200.  
  1201.    or, in VMS
  1202.  
  1203.     f(x) = `run    leastsq`
  1204.  
  1205.  
  1206.  
  1207.  
  1208.    _1_6.    _u_s_e_r__d_e_f_i_n_e_d
  1209.  
  1210.  
  1211.    You may define your own functions and variables.  User-defined func-
  1212.    tions and variables may be used anywhere.
  1213.  
  1214.    User-defined    function syntax:
  1215.        <function-name> ( <dummy-var> ) =  <expression>
  1216.  
  1217.    Where <expression> is defined in terms of <dummy-var>.
  1218.  
  1219.    User-defined    variable syntax:
  1220.        <variable-name> = <constant-expression>
  1221.  
  1222.    Examples:
  1223.        w = 2
  1224.        q = floor(tan(pi/2 - 0.1))
  1225.        f(x) = sin(w*x)
  1226.        sinc(x) = sin(pi*x)/(pi*x)
  1227.        delta(t)    = (t ==    0)
  1228.        ramp(t) = (t > 0) ? t : 0
  1229.  
  1230.    The variable    'pi' is    already    defined    for you.
  1231.  
  1232.    See 'show functions'    and 'show variables'.
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.                  GNUPLOT                  i
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.                 Table of Contents
  1266.  
  1267.  
  1268.  
  1269.  
  1270.    clear .........................................................    1
  1271.  
  1272.    exit    ..........................................................    1
  1273.  
  1274.    expressions ...................................................    1
  1275.  
  1276.     functions ................................................    1
  1277.  
  1278.          abs .................................................    2
  1279.  
  1280.          acos ................................................    2
  1281.  
  1282.          arg .................................................    2
  1283.  
  1284.          asin ................................................    2
  1285.  
  1286.          atan ................................................    2
  1287.  
  1288.          besj0 ...............................................    2
  1289.  
  1290.          besj1 ...............................................    3
  1291.  
  1292.          besy0 ...............................................    3
  1293.  
  1294.          besy1 ...............................................    3
  1295.  
  1296.          ceil ................................................    3
  1297.  
  1298.          cos .................................................    3
  1299.  
  1300.          cosh ................................................    3
  1301.  
  1302.          exp .................................................    4
  1303.  
  1304.          floor ...............................................    4
  1305.  
  1306.          imag ................................................    4
  1307.  
  1308.          int .................................................    4
  1309.  
  1310.          log .................................................    4
  1311.  
  1312.          log10 ...............................................    4
  1313.  
  1314.          real ................................................    4
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.                  GNUPLOT                 ii
  1326.  
  1327.  
  1328.          sgn .................................................    5
  1329.  
  1330.          sin .................................................    5
  1331.  
  1332.          sinh ................................................    5
  1333.  
  1334.          sqrt ................................................    5
  1335.  
  1336.          tan .................................................    5
  1337.  
  1338.          tanh ................................................    5
  1339.  
  1340.     operators ................................................    5
  1341.  
  1342.          binary ..............................................    6
  1343.  
  1344.          unary ...............................................    6
  1345.  
  1346.    help    ..........................................................    7
  1347.  
  1348.    load    ..........................................................    7
  1349.  
  1350.    pause .........................................................    7
  1351.  
  1352.    plot    ..........................................................    8
  1353.  
  1354.     data_file ................................................    8
  1355.  
  1356.     ranges ...................................................    9
  1357.  
  1358.     style ....................................................   10
  1359.  
  1360.    print .........................................................   10
  1361.  
  1362.    quit    ..........................................................   11
  1363.  
  1364.    replot ........................................................   11
  1365.  
  1366.    save    ..........................................................   11
  1367.  
  1368.    set-show ......................................................   11
  1369.  
  1370.     all ......................................................   11
  1371.  
  1372.     autoscale ................................................   12
  1373.  
  1374.     dummy ....................................................   12
  1375.  
  1376.     functions ................................................   12
  1377.  
  1378.     logscale .................................................   13
  1379.  
  1380.     polar ....................................................   13
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.                  GNUPLOT                iii
  1392.  
  1393.  
  1394.     offsets    ..................................................   13
  1395.  
  1396.     output ...................................................   14
  1397.  
  1398.     samples    ..................................................   14
  1399.  
  1400.     style ....................................................   14
  1401.  
  1402.     terminal .................................................   15
  1403.  
  1404.     variables ................................................   15
  1405.  
  1406.     version    ..................................................   15
  1407.  
  1408.     xrange ...................................................   16
  1409.  
  1410.     yrange ...................................................   16
  1411.  
  1412.     zero .....................................................   16
  1413.  
  1414.    shell .........................................................   17
  1415.  
  1416.    start_up ......................................................   17
  1417.  
  1418.    substitution    ..................................................   17
  1419.  
  1420.    user_defined    ..................................................   18
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.                    May 26, 1989
  1451.  
  1452.  
  1453.