-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathgnuplot.html
217 lines (188 loc) · 6.39 KB
/
gnuplot.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<html>
<head>
<title>
GNUPLOT: Programs that Set Up GNUPLOT Graphics
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
GNUPLOT <br> Programs that Set Up GNUPLOT Graphics
</h1>
<hr>
<p>
<b>GNUPLOT</b>
is a set of MATLAB programs which
illustrate how commands and data for the GNUPLOT graphics program
can be generated, to illustrate the results of a calculation.
</p>
<p>
Ordinarily, GNUPLOT is used interactively; that is, the user
invokes the program, and then describes the plot to be created.
The data for the plot is created either by a formula, or by
reference to some data file created earlier.
</p>
<p>
It is often extremely important to be able to create graphical
images of the results of an executable program. If the user is
familiar with GNUPLOT, then the program can be modified to create
a suitable data file, and, once the program has completed,
the user can run GNUPLOT and use that data file to create a graph.
</p>
<p>
However, if the program is going to create the data file, it can
just as easily create a file containing the appropriate commands
to GNUPLOT that will create the desired image. In this way,
the user can avoid having to recall the correct commands in the
correct order to create the plot.
</p>
<p>
Thus, the program might create two files, called, perhaps
<i>data.txt</i> and <i>commands.txt</i>. The command file would
contain GNUPLOT commands, including one that refers to the data file
itself. To create the graphics image, the user would simply type
<pre>
gnuplot < commands.txt
</pre>
</p>
<p>
This directory includes some sample programs which carry out
numerical calculations, creating data and command files that
are used in exactly this way.
</p>
<p>
By the way, every time I run gnuplot, I get the obnoxious warning
message
<pre>
Could not find/open font when opening font "arial", using internal non-scalable font
</pre>
I had to fix this with the following lines added to my .bashrc file:
<pre>
export GDFONTPATH=/usr/share/fonts/liberation
export GNUPLOT_DEFAULT_GDFONT=LiberationSans-Regular
</pre>
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>GNUPLOT</b> is available in
<a href = "../../examples/gnuplot/gnuplot.html">a non-language specific version</a> and
<a href = "../../c_src/gnuplot/gnuplot.html">a C version</a> and
<a href = "../../cpp_src/gnuplot/gnuplot.html">a C++ version</a> and
<a href = "../../f77_src/gnuplot/gnuplot.html">a FORTRAN77 version</a> and
<a href = "../../f_src/gnuplot/gnuplot.html">a FORTRAN90 version</a> and
<a href = "../../m_src/gnuplot/gnuplot.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../m_src/fem2d_plot_gpl/fem2d_plot_gpl.html">
FEM2D_PLOT_GPL</a>,
a MATLAB program which
reads information about nodes, elements and nodal values for a
2D finite element method (FEM) and creates a GPL file describing
a surface plot of U(X,Y), which can be displayed by GNUPLOT.
</p>
<p>
<a href = "../../m_src/gpl_display/gpl_display.html">
GPL_DISPLAY</a>,
a MATLAB library which
tries to read the data in a typical gnuplot GPL file,
and display it in a more attractive way than gnuplot is capable of.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Philipp Janert,<br>
Gnuplot in Action: Understanding Data with Graphs,<br>
Manning, 2010,<br>
ISBN13: 978-1-933988-39-8,<br>
LC: QA276.4.J37.
</li>
<li>
Thomas Williams, Colin Kelley,<br>
gnuplot 4.4, An Interactive Plotting Program,<br>
The Free Software Foundation, 2010.
</li>
<li>
<a href = "http://www.gnuplot.info/">The GNUPLOT Website</a>.
</li>
</ol>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<b>DAMPED_SINE</b> evaluates the damped sine correlation function for a range
of values of its argument. A plot of the function is desired.
<ul>
<li>
<a href = "damped_sine.m">damped_sine.m</a>, the source code.
</li>
<li>
<a href = "damped_sine_output.txt">damped_sine_output.txt</a>,
the output file.
</li>
<li>
<a href = "damped_sine_data.txt">damped_sine_data.txt</a>,
a file containing the data values.
</li>
<li>
<a href = "damped_sine_commands.txt">damped_sine_commands.txt</a>,
GNUPLOT commands that can create an image from the data file.
</li>
<li>
<a href = "damped_sine.png">damped_sine.png</a>,
an image of the data.
</li>
</ul>
</p>
<p>
<b>STRING_SIMULATION</b> simulates the behavior of a string that obeys
the wave equation. The shape of the string is to be plotted over successive
times.
<ul>
<li>
<a href = "string_simulation.m">string_simulation.m</a>, the source code.
</li>
<li>
<a href = "string_simulation_output.txt">string_simulation_output.txt</a>,
the output file.
</li>
<li>
<a href = "string_data.txt">string_data.txt</a>,
a file containing the data values.
</li>
<li>
<a href = "string_commands.txt">string_commands.txt</a>,
GNUPLOT commands that can create an image from the data file.
</li>
<li>
<a href = "string.png">string.png</a>,
an image of the data.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../m_src.html">
the MATLAB directory</a>.
</p>
<hr>
<i>
Last revised on 04 January 2013.
</i>
<!-- John Burkardt -->
</body>
</html>