forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraphics_examples.html
309 lines (280 loc) · 9.23 KB
/
graphics_examples.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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<html>
<head>
<title>
GRAPHICS_EXAMPLES - Sample Data for Graphics Demonstrations
</title>
</head>
<body bgcolor="#eeeeee" link="#cc0000" alink="#ff3300" vlink="#000055">
<h1 align = "center">
GRAPHICS_EXAMPLES <br> Sample Data for Graphics Demonstrations
</h1>
<hr>
<p>
<b>GRAPHICS_EXAMPLES</b>,
C++ programs which
illustrate how various kinds of data can be displayed and analyzed graphically.
</p>
<p>
These programs rely on the DISLIN package to set up the graphics output.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files 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>GRAPHICS_EXAMPLES</b> programs are available in
<a href = "../../c_src/graphics_examples/graphics_examples.html">a C version</a> and
<a href = "../../cpp_src/graphics_examples/graphics_examples.html">a C++ version</a> and
<a href = "../../examples/graphics_examples_gnuplot/graphics_examples_convert.html">CONVERT</a> and
<a href = "../../datasets/graphics_examples/graphics_examples.html">a dataset version</a> and
<a href = "../../f77_src/graphics_examples/graphics_examples.html">a FORTRAN77 version</a> and
<a href = "../../f_src/graphics_examples/graphics_examples.html">a FORTRAN90 version</a> and
<a href = "../../examples/graphics_examples_gnuplot/graphics_examples_gnuplot.html">GNUPLOT</a> and
<a href = "../../examples/graphics_examples_grace/graphics_examples_grace.html">GRACE</a> and
<a href = "../../math_src/graphics_examples/graphics_examples.html">a MATHEMATICA version</a> and
<a href = "../../m_src/graphics_examples/graphics_examples.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../cpp_src/dislin/dislin.html">
DISLIN</a>,
C++ programs which
illustrate the use of DISLIN, a scientific graphics package, by Helmut Michels.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Andrew Frank, Arthur Asuncion,<br>
UCI Machine Learning Repository,<br>
http://archive.ics.uci.edu/ml,<br>
School of Information and Computer Science,<br>
University of California, Irvine, California.
</li>
<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>
Wendy Martinez, Angel Martinez,<br>
Computational Statistics Handbook with MATLAB,<br>
Chapman and Hall / CRC, 2002,<br>
ISBN: 1-58488-229-8,<br>
LC: QA276.4.M272.
</li>
<li>
Helmut Michels,<br>
The Data Plotting Software DISLIN - version 10.4, <br>
Shaker Media GmbH, January 2010,<br>
ISBN13: 978-3-86858-517-9.
</li>
</ol>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<b>CIRCLE_INOUT</b> depicts 500 pairs of (X,Y) data points in the unit square,
395 of which lie inside the unit circle, and 105 outside. If possible,
the "inside" points should be blue, the "outside" points red, and the
circle itself should also be drawn.
<ul>
<li>
<a href = "circle_in.txt">circle_in.txt</a>,
the coordinates of points inside the circle.
</li>
<li>
<a href = "circle_out.txt">circle_out.txt</a>,
the coordinates of points outside the circle.
</li>
<li>
<a href = "circle_inout.cpp">circle_inout.cpp</a>,
reads the data and makes a plot.
</li>
<li>
<a href = "circle_inout.png">circle_inout.png</a>,
a PNG image of the plot.
</li>
</ul>
</p>
<p>
<b>GEYSER</b> contains the waiting time in minutes between
successive eruptions of the Old Faithful geyser. 299 values are
recorded. The data ranges from 43 to 108. It should be displayed in 14 bins
of width 5 from 40 to 110. The data comes from Martinez and Martinez.
<ul>
<li>
<a href = "geyser.txt">geyser.txt</a>, the data set;
</li>
<li>
<a href = "geyser_binned.txt">geyser_binned.txt</a>,
the data set after being grouped into 14 bins;
</li>
<li>
<a href = "geyser.cpp">geyser.cpp</a>,
reads the data and makes a plot.
</li>
<li>
<a href = "geyser.png">geyser.png</a>,
a PNG image of the plot.
</li>
</ul>
</p>
<p>
<b>LISSAJOUS</b> records 1000 points on a Lissajous curve defined by
x=sin(3*t+pi/2), y=sin(4t). The curve is to be plotted and every tenth point marked.
<ul>
<li>
<a href = "lissajous.txt">lissajous.txt</a>,
the data.
</li>
<li>
<a href = "lissajous.cpp">lissajous.cpp</a>,
reads the data and makes a plot.
</li>
<li>
<a href = "lissajous.sh">lissajous.sh</a>, commands to
compile, link and run the sample calling program;
</li>
<li>
<a href = "lissajous_output.txt">lissajous_output.txt</a>,
the output file.
</li>
<li>
<a href = "lissajous.png">lissajous.png</a>,
a PNG image of the plot.
</li>
</ul>
</p>
<p>
<b>LYNX</b> records the yearly lynx harvest from 1821 to 1934.
The graph should plot the data points as circles, and connect consecutive
data points with straight line segments to suggest a curve.
<ul>
<li>
<a href = "lynx.txt">lynx.txt</a>,
the data.
</li>
<li>
<a href = "lynx.cpp">lynx.cpp</a>,
creates the data and displays a scatter plot.
</li>
<li>
<a href = "lynx.sh">lynx.sh</a>, commands to
compile, link and run the sample calling program;
</li>
<li>
<a href = "lynx_output.txt">lynx_output.txt</a>,
the output file.
</li>
<li>
<a href = "lynx.png">lynx.png</a>,
a PNG image of the plot.
</li>
</ul>
</p>
<p>
<b>ORBITAL</b> records, on a 101x101 grid over [0,4*pi]x[0,4*pi], the minimum
distance between two planets given a pair of orbital angles. A contour
plot of this data is to be presented.
<ul>
<li>
<a href = "orbital.txt">orbital.txt</a>,
the data.
</li>
<li>
<a href = "orbital.cpp">orbital.cpp</a>,
reads the data and makes a plot.
</li>
<li>
<a href = "orbital.sh">orbital.sh</a>, commands to
compile, link and run the sample calling program;
</li>
<li>
<a href = "orbital_output.txt">orbital_output.txt</a>,
the output file.
</li>
<li>
<a href = "orbital.png">orbital.png</a>,
a PNG image of the plot.
</li>
</ul>
</p>
<p>
<b>SCATTER_PLOT</b> generates 500 pairs of (X,Y) data, which lie in the unit square,
and tend to cluster around (0.5,0.5).
<ul>
<li>
<a href = "scatter_plot.txt">scatter_plot.txt</a>,
the data.
</li>
<li>
<a href = "scatter_plot.cpp">scatter_plot.cpp</a>,
creates the data and displays a scatter plot.
</li>
<li>
<a href = "scatter_plot.sh">scatter_plot.sh</a>, commands to
compile, link and run the sample calling program;
</li>
<li>
<a href = "scatter_plot_output.txt">scatter_plot_output.txt</a>,
the output file.
</li>
<li>
<a href = "scatter_plot.png">scatter_plot.png</a>,
a PNG image of the plot.
</li>
</ul>
</p>
<p>
<b>SURFACE_GRID</b> records, on a 41x41 grid over [-2,2]x[-2,+2], the values
z = exp(-(x^2+y^2)) * cos(0.25*x) * sin(y) * cos(2*(x^2+y^2)).
The data is to be plotted as a surface.
<ul>
<li>
<a href = "surface_grid.txt">surface_grid.txt</a>,
the data.
</li>
<li>
<a href = "surface_grid.cpp">surface_grid.cpp</a>,
reads the data and makes a plot.
</li>
<li>
<a href = "surface_grid.sh">surface_grid.sh</a>, commands to
compile, link and run the sample calling program;
</li>
<li>
<a href = "surface_grid_output.txt">surface_grid_output.txt</a>,
the output file.
</li>
<li>
<a href = "surface_grid.png">surface_grid.png</a>,
a PNG image of the plot.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last modified on 20 May 2011.
</i>
<!-- John Burkardt -->
</body>
</html>