Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pmi432 / LR02 / Books / gnuplot 4.6 manual.pdf
Скачиваний:
59
Добавлен:
18.03.2015
Размер:
2.22 Mб
Скачать

72

 

gnuplot 4.6

pause -1

# Wait until

a carriage

return is hit

pause 3

# Wait three

seconds

 

pause -1 "Hit return to

continue"

 

pause 10

"Isn't this pretty? It's

a cubic spline."

pause mouse "Click any mouse button

on selected data point"

pause mouse keypress "Type a letter

from A-F in the active window"

pause mouse button1,keypress

 

pause mouse any "Any key or button will terminate"

The variant "pause mouse key" will resume after any keypress in the active plot window. If you want to wait for a particular key to be pressed, you can use a reread loop such as:

print "I will resume after you hit the Tab key in the plot window" load "wait_for_tab"

File "wait for tab" contains the lines

pause mouse key

if (MOUSE_KEY != 9) reread

Plot

plot is the primary command for drawing plots with gnuplot. It creates plots of functions and data in many, many ways. plot is used to draw 2D functions and data; splot draws 2D projections of 3D surfaces and data. plot and splot o er many features in common; see splot (p. 167) for di erences. Note speci cally that although the binary <binary list> variation does work for both plot and splot, there are small di erences between them.

Syntax:

plot {<ranges>} {<iteration>}

{<function> | {"<datafile>" {datafile-modifiers}}} {axes <axes>} {<title-spec>} {with <style>}

{, {definitions{,}} <function> ...}

where either a <function> or the name of a data le enclosed in quotes is supplied. A function is a mathematical expression or a pair of mathematical expressions in parametric mode. Functions may be builtin, user-de ned, or provided in the plot command itself. Multiple data les and/or functions may be plotted in a single command, separated by commas. See data (p. 77), functions (p. 87).

Examples:

plot sin(x)

plot sin(x), cos(x)

plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x)

plot "datafile.1" with lines, "datafile.2" with points plot [t=1:10] [-pi:pi*2] tan(t), \

"data.1" using (tan($2)):($3/$4) smooth csplines \ axes x1y2 notitle with lines 5

plot for [datafile in "spinach.dat broccoli.dat"] datafile

See also show plot (p. 133).

Axes

There are four possible sets of axes available; the keyword <axes> is used to select the axes for which a particular line should be scaled. x1y1 refers to the axes on the bottom and left; x2y2 to those on the top and right; x1y2 to those on the bottom and right; and x2y1 to those on the top and left. Ranges speci ed on the plot command apply only to the rst set of axes (bottom left).

Соседние файлы в папке Books