forked from johannesgerer/jburkardt-m
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gridlines.html
237 lines (203 loc) · 6.6 KB
/
gridlines.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
<html>
<head>
<title>
GRIDLINES - Add Grid Lines to a MATLAB Plot
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
GRIDLINES <br> Add Grid Lines to a MATLAB Plot
</h1>
<hr>
<p>
<b>GRIDLINES</b>
is a MATLAB library which
contains routines to draw grid lines on MATLAB plots.
</p>
<p>
MATLAB's plotting commands include the "grid on" option, which
places a certain number of grid lines on your plot. However, if
you don't like the choice of placement, linestyle, coloring, or
the number of grid lines, changing these features, while possible,
requires an extensive trip through MATLAB's plotting underworld.
</p>
<p>
But gridlines are just lines, and you can use the <b>line</b> command
to draw them. The functions provided here do just that, with a
reasonable interface that lets you select where and how many lines
you want. If you look inside the text of the functions, you can
easily modify other features, such as the line color.
</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>GRIDLINES</b> is available in
<a href = "../../m_src/gridlines/gridlines.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../m_src/cc_display/cc_display.html">
CC_DISPLAY</a>,
a MATLAB program which
displays the abscissas
used in various kinds of Clenshaw Curtis quadrature rules.
</p>
<p>
<a href = "../../m_src/gl_display/gl_display.html">
GL_DISPLAY</a>,
a MATLAB program which
displays the abscissas
used in various kinds of Gauss Legendre quadrature rules.
</p>
<p>
<a href = "../../m_src/grid_display/grid_display.html">
GRID_DISPLAY</a>,
a MATLAB library which
can display a 2D or 3D grid or sparse grid.
</p>
<p>
<a href = "../../m_src/mesh_display/mesh_display.html">
MESH_DISPLAY</a>,
a MATLAB program which
reads data defining a polygonal mesh and displays it, with optional numbering.
</p>
<p>
<a href = "../../m_src/nested_sequence_display/nested_sequence_display.html">
NESTED_SEQUENCE_DISPLAY</a>,
a MATLAB program which
displays a set of nested sequences.
</p>
<p>
<a href = "../../m_src/sequence_streak_display/sequence_streak_display.html">
SEQUENCE_STREAK_DISPLAY</a>,
a MATLAB program which
displays a "streak plot" of a numeric sequence;
</p>
<p>
<a href = "../../m_src/triangulation_display/triangulation_display.html">
TRIANGULATION_DISPLAY</a>,
a MATLAB program which
displays the nodes and elements of a triangulation on the MATLAB graphics screen;
</p>
<p>
<a href = "../../m_src/xy_display/xy_display.html">
XY_DISPLAY</a>,
a MATLAB program which
reads a set of 2D points from
a file and plots them in a the MATLAB graphics window.
</p>
<p>
<a href = "../../m_src/xyf_display/xyf_display.html">
XYF_DISPLAY</a>,
a MATLAB program which
reads XYF information defining points and faces in 2D,
and displays an image in a MATLAB graphics window.
</p>
<p>
<a href = "../../m_src/xyl_display/xyl_display.html">
XYL_DISPLAY</a>,
a MATLAB program which
reads XYL information defining points and lines in 2D,
and displays an image in a MATLAB graphics window.
</p>
<p>
<a href = "../../m_src/xyz_display/xyz_display.html">
XYZ_DISPLAY</a>,
a MATLAB program which
reads a set of 3D points from
a file and plots them in a the MATLAB graphics window.
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "circular_arc.m">circular_arc.m</a>
draws a circle, or circular arc.
</li>
<li>
<a href = "grid_polar.m">grid_polar.m</a>
draws a polar grid, that is, NR circular arcs between
RMIN and RMAX, drawn at NANG equally spaced angles between
ANGMIN and ANGMAX.
</li>
<li>
<a href = "grid_rectangular.m">grid_rectangular.m</a>
draws a rectangular grid, that is, XNUM vertical lines
between XMIN and XMAX, and YNUM horizontal lines between
YMIN and YMAX.
</li>
<li>
<a href = "grid_triangular.m">grid_triangular.m</a>
draws a triangular grid, drawing NGRID equally spaced lines
parallel to each side of a triangle.
</li>
<li>
<a href = "timestamp.m">timestamp.m</a>
prints the YMDHMS date as a timestamp.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "gridlines_test.m">gridlines_test.m</a>,
calls all the tests.
</li>
<li>
<a href = "gridlines_test01.m">gridlines_test01.m</a>,
plots 100 random points, and draws an 11 by 11 grid.
</li>
<li>
<a href = "gridlines_test01.png">gridlines_test01.png</a>,
a PNG image of the plot.
</li>
<li>
<a href = "gridlines_test02.m">gridlines_test02.m</a>,
plots 400 random points in the upper half circle, using
R = sqrt ( rand ), and 400 points in the lower half circle,
using R = rand.
</li>
<li>
<a href = "gridlines_test02.png">gridlines_test02.png</a>,
a PNG image of the plot.
</li>
<li>
<a href = "gridlines_test03.m">gridlines_test03.m</a>,
draws two triangular grids on one plot; the larger
triangle has 10 interior grid lines in each direction,
the smaller has 3.
</li>
<li>
<a href = "gridlines_test03.png">gridlines_test03.png</a>,
a PNG image of the plot.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../m_src.html">
the MATLAB source codes</a>.
</p>
<hr>
<i>
Last revised on 30 July 2010.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>