7018
|
1 @c Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, |
|
2 @c 2006, 2007 John W. Eaton |
|
3 @c |
|
4 @c This file is part of Octave. |
|
5 @c |
|
6 @c Octave is free software; you can redistribute it and/or modify it |
|
7 @c under the terms of the GNU General Public License as published by the |
|
8 @c Free Software Foundation; either version 3 of the License, or (at |
|
9 @c your option) any later version. |
|
10 @c |
|
11 @c Octave is distributed in the hope that it will be useful, but WITHOUT |
|
12 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 @c for more details. |
|
15 @c |
|
16 @c You should have received a copy of the GNU General Public License |
|
17 @c along with Octave; see the file COPYING. If not, see |
|
18 @c <http://www.gnu.org/licenses/>. |
3294
|
19 |
4167
|
20 @node Plotting |
3294
|
21 @chapter Plotting |
6888
|
22 @cindex plotting |
|
23 @cindex graphics |
3294
|
24 |
|
25 @menu |
6888
|
26 * Plotting Basics:: |
|
27 * Advanced Plotting:: |
|
28 @end menu |
|
29 |
|
30 @node Plotting Basics |
|
31 @section Plotting Basics |
|
32 |
|
33 Octave makes it easy to create many different types of two- and |
|
34 three-dimensional plots using a few high-level functions. |
|
35 |
|
36 If you need finer control over graphics, see @ref{Advanced Plotting}. |
|
37 |
|
38 @menu |
|
39 * Two-Dimensional Plots:: |
3294
|
40 * Three-Dimensional Plotting:: |
|
41 * Plot Annotations:: |
|
42 * Multiple Plots on One Page:: |
3428
|
43 * Multiple Plot Windows:: |
6888
|
44 * Printing Plots:: |
|
45 * Test Plotting Functions:: |
3294
|
46 @end menu |
|
47 |
6888
|
48 @node Two-Dimensional Plots |
|
49 @subsection Two-Dimensional Plots |
|
50 |
|
51 The @code{plot} function allows you to create simple x-y plots with |
|
52 linear axes. For example, |
3294
|
53 |
6888
|
54 @example |
|
55 @group |
|
56 x = -10:0.1:10; |
|
57 plot (x, sin (x)); |
|
58 @end group |
|
59 @end example |
|
60 |
|
61 @noindent |
6899
|
62 displays a sine wave shown in @ref{fig:plot}. On most systems, this |
6888
|
63 command will open a separate plot window to display the graph. |
5134
|
64 |
6888
|
65 @float Figure,fig:plot |
|
66 @image{plot,8cm} |
|
67 @caption{Simple Two-Dimensional Plot.} |
|
68 @end float |
|
69 |
|
70 The function @code{fplot} also generates two-dimensional plots with |
|
71 linear axes using a function name and limits for the range of the |
|
72 x-coordinate instead of the x and y data. For example, |
5134
|
73 |
6888
|
74 @example |
|
75 @group |
|
76 fplot (@@sin, [-10, 10], 201); |
|
77 @end group |
|
78 @end example |
|
79 |
|
80 @noindent |
|
81 produces a plot that is equivalent to the one above, but also includes a |
|
82 legend displaying the name of the plotted function. |
6502
|
83 |
5134
|
84 @DOCSTRING(plot) |
|
85 |
6502
|
86 @DOCSTRING(fplot) |
|
87 |
6888
|
88 The functions @code{semilogx}, @code{semilogy}, and @code{loglog} are |
|
89 similar to the @code{plot} function, but produce plots in which one or |
|
90 both of the axes use log scales. |
|
91 |
|
92 @DOCSTRING(semilogx) |
6502
|
93 |
6888
|
94 @DOCSTRING(semilogy) |
6502
|
95 |
6888
|
96 @DOCSTRING(loglog) |
|
97 |
|
98 The functions @code{bar}, @code{barh}, @code{stairs}, and @code{stem} |
|
99 are useful for displaying discrete data. For example, |
5134
|
100 |
6888
|
101 @example |
|
102 @group |
|
103 hist (randn (10000, 1), 30); |
|
104 @end group |
|
105 @end example |
5134
|
106 |
6888
|
107 @noindent |
|
108 produces the histogram of 10,000 normally distributed random numbers |
6899
|
109 shown in @ref{fig:hist}. |
5134
|
110 |
6888
|
111 @float Figure,fig:hist |
|
112 @image{hist,8cm} |
|
113 @caption{Histogram.} |
|
114 @end float |
5134
|
115 |
|
116 @DOCSTRING(bar) |
|
117 |
6877
|
118 @DOCSTRING(barh) |
|
119 |
6888
|
120 @DOCSTRING(hist) |
|
121 |
|
122 @DOCSTRING(stairs) |
|
123 |
|
124 @DOCSTRING(stem) |
|
125 |
|
126 The @code{contour} and @code{contourc} functions produce two-dimensional |
|
127 contour plots from three dimensional data. |
|
128 |
5134
|
129 @DOCSTRING(contour) |
|
130 |
6502
|
131 @DOCSTRING(contourc) |
|
132 |
6888
|
133 The @code{errorbar}, @code{semilogxerr}, @code{semilogyerr}, and |
|
134 @code{loglogerr} functions produces plots with error bar markers. For |
|
135 example, |
6877
|
136 |
6888
|
137 @example |
|
138 x = 0:0.1:10; |
|
139 y = sin (x); |
|
140 yp = 0.1 .* randn (size (x)); |
|
141 ym = -0.1 .* randn (size (x)); |
|
142 errorbar (x, sin (x), ym, yp); |
|
143 @end example |
5134
|
144 |
6888
|
145 @noindent |
6899
|
146 produces the figure shown in @ref{fig:errorbar}. |
6502
|
147 |
6888
|
148 @float Figure,fig:errorbar |
|
149 @image{errorbar,8cm} |
|
150 @caption{Errorbar plot.} |
|
151 @end float |
5134
|
152 |
|
153 @DOCSTRING(errorbar) |
|
154 |
|
155 @DOCSTRING(semilogxerr) |
|
156 |
|
157 @DOCSTRING(semilogyerr) |
|
158 |
6888
|
159 @DOCSTRING(loglogerr) |
|
160 |
|
161 Finally, the @code{polar} function allows you to easily plot data in |
7001
|
162 polar coordinates. However, the display coordinates remain rectangular |
6888
|
163 and linear. For example, |
|
164 |
|
165 @example |
|
166 polar (0:0.1:10*pi, 0:0.1:10*pi); |
|
167 @end example |
|
168 |
|
169 @noindent |
6899
|
170 produces the spiral plot shown in @ref{fig:polar}. |
6888
|
171 |
|
172 @float Figure,fig:polar |
|
173 @image{polar,8cm} |
|
174 @caption{Polar plot.} |
|
175 @end float |
|
176 |
|
177 @DOCSTRING(polar) |
|
178 |
7120
|
179 @DOCSTRING(pie) |
|
180 |
|
181 @DOCSTRING(quiver) |
|
182 |
|
183 @DOCSTRING(pcolor) |
|
184 |
7153
|
185 @DOCSTRING(area) |
|
186 |
6888
|
187 The axis function may be used to change the axis limits of an existing |
|
188 plot. |
|
189 |
|
190 @DOCSTRING(axis) |
|
191 |
7189
|
192 Similarly the axis limits of the colormap can be changed with the caxis |
|
193 function. |
|
194 |
|
195 @DOCSTRING(caxis) |
|
196 |
5134
|
197 @node Three-Dimensional Plotting |
6888
|
198 @subsection Three-Dimensional Plotting |
|
199 |
|
200 The function @code{mesh} produces mesh surface plots. For example, |
|
201 |
|
202 @example |
|
203 @group |
|
204 tx = ty = linspace (-8, 8, 41)'; |
|
205 [xx, yy] = meshgrid (tx, ty); |
|
206 r = sqrt (xx .^ 2 + yy .^ 2) + eps; |
|
207 tz = sin (r) ./ r; |
|
208 mesh (tx, ty, tz); |
|
209 @end group |
|
210 @end example |
|
211 |
|
212 @noindent |
6899
|
213 produces the familiar ``sombrero'' plot shown in @ref{fig:mesh}. Note |
6888
|
214 the use of the function @code{meshgrid} to create matrices of X and Y |
|
215 coordinates to use for plotting the Z data. The @code{ndgrid} function |
|
216 is similar to @code{meshgrid}, but works for N-dimensional matrices. |
|
217 |
|
218 @float Figure,fig:mesh |
|
219 @image{mesh,8cm} |
|
220 @caption{Mesh plot.} |
|
221 @end float |
5134
|
222 |
6888
|
223 The @code{meshc} function is similar to @code{mesh}, but also produces a |
|
224 plot of contours for the surface. |
|
225 |
|
226 The @code{plot3} function displays arbitrary three-dimensional data, |
|
227 without requiring it to form a surface. For example |
|
228 |
|
229 @example |
|
230 @group |
|
231 t = 0:0.1:10*pi; |
|
232 r = linspace (0, 1, numel (t)); |
|
233 z = linspace (0, 1, numel (t)); |
|
234 plot3 (r.*sin(t), r.*cos(t), z); |
|
235 @end group |
|
236 @end example |
|
237 |
|
238 @noindent |
6899
|
239 displays the spiral in three dimensions shown in @ref{fig:plot3}. |
6888
|
240 |
|
241 @float Figure,fig:plot3 |
|
242 @image{plot3,8cm} |
|
243 @caption{Three dimensional spiral.} |
|
244 @end float |
|
245 |
|
246 Finally, the @code{view} function changes the viewpoint for |
|
247 three-dimensional plots. |
5134
|
248 |
|
249 @DOCSTRING(mesh) |
|
250 |
6788
|
251 @DOCSTRING(meshc) |
|
252 |
7153
|
253 @DOCSTRING(hidden) |
|
254 |
7120
|
255 @DOCSTRING(surf) |
|
256 |
|
257 @DOCSTRING(surfc) |
|
258 |
5134
|
259 @DOCSTRING(meshgrid) |
|
260 |
6550
|
261 @DOCSTRING(ndgrid) |
|
262 |
6888
|
263 @DOCSTRING(plot3) |
|
264 |
6502
|
265 @DOCSTRING(view) |
|
266 |
7120
|
267 @DOCSTRING(shading) |
|
268 |
6888
|
269 @node Plot Annotations |
|
270 @subsection Plot Annotations |
6502
|
271 |
6888
|
272 You can add titles, axis labels, legends, and arbitrary text to an |
|
273 existing plot. For example, |
6877
|
274 |
6888
|
275 @example |
|
276 @group |
|
277 x = -10:0.1:10; |
|
278 plot (x, sin (x)); |
|
279 title ("sin(x) for x = -10:0.1:10"); |
|
280 xlabel ("x"); |
|
281 ylabel ("sin (x)"); |
|
282 text (pi, 0.7, "arbitrary text"); |
|
283 legend ("sin (x)"); |
|
284 @end group |
|
285 @end example |
6502
|
286 |
6888
|
287 The functions @code{grid} and @code{box} may also be used to add grid |
|
288 and border lines to the plot. By default, the grid is off and the |
|
289 border lines are on. |
5134
|
290 |
|
291 @DOCSTRING(title) |
|
292 |
6502
|
293 @DOCSTRING(legend) |
|
294 |
|
295 @DOCSTRING(text) |
|
296 |
5134
|
297 @DOCSTRING(xlabel) |
|
298 |
6502
|
299 @DOCSTRING(box) |
|
300 |
|
301 @DOCSTRING(grid) |
|
302 |
5134
|
303 @node Multiple Plots on One Page |
6888
|
304 @subsection Multiple Plots on One Page |
|
305 |
|
306 Octave can display more than one plot in a single figure. The simplest |
|
307 way to do this is to use the @code{subplot} function to divide the plot |
|
308 area into a series of subplot windows that are indexed by an integer. |
|
309 For example, |
|
310 |
|
311 @example |
|
312 @group |
|
313 subplot (2, 1, 1) |
|
314 fplot (@@sin, [-10, 10]); |
|
315 subplot (2, 1, 2) |
|
316 fplot (@@cos, [-10, 10]); |
|
317 @end group |
|
318 @end example |
|
319 |
|
320 @noindent |
|
321 creates a figure with two separate axes, one displaying a sine wave and |
|
322 the other a cosine wave. The first call to subplot divides the figure |
|
323 into two plotting areas (two rows and one column) and makes the first plot |
|
324 area active. The grid of plot areas created by @code{subplot} is |
|
325 numbered in column-major order (top to bottom, left to right). |
5134
|
326 |
|
327 @DOCSTRING(subplot) |
|
328 |
|
329 @node Multiple Plot Windows |
6888
|
330 @subsection Multiple Plot Windows |
|
331 |
|
332 You can open multiple plot windows using the @code{figure} function. |
|
333 For example |
|
334 |
|
335 @example |
|
336 figure (1); |
|
337 fplot (@@sin, [-10, 10]); |
|
338 figure (2); |
|
339 fplot (@@cos, [-10, 10]); |
|
340 @end example |
|
341 |
|
342 @noindent |
|
343 creates two figures, with the first displaying a sine wave and |
|
344 the second a cosine wave. Figure numbers must be positive integers. |
5134
|
345 |
|
346 @DOCSTRING(figure) |
|
347 |
6502
|
348 @node Printing Plots |
6888
|
349 @subsection Printing Plots |
|
350 |
|
351 The @code{print} command allows you to save plots in a variety of |
|
352 formats. For example, |
|
353 |
|
354 @example |
|
355 print -deps foo.eps |
|
356 @end example |
|
357 |
|
358 @noindent |
|
359 writes the current figure to an encapsulated PostScript file called |
|
360 @file{foo.eps}. |
6502
|
361 |
|
362 @DOCSTRING(print) |
|
363 |
|
364 @DOCSTRING(orient) |
5134
|
365 |
6788
|
366 @node Test Plotting Functions |
6888
|
367 @subsection Test Plotting Functions |
|
368 |
|
369 The functions @code{sombrero} and @code{peaks} provide a way to check |
|
370 that plotting is working. Typing either @code{sombrero} or @code{peaks} |
|
371 at the Octave prompt should display a three dimensional plot. |
6788
|
372 |
6877
|
373 @DOCSTRING(sombrero) |
|
374 |
6788
|
375 @DOCSTRING(peaks) |
|
376 |
6888
|
377 @node Advanced Plotting |
|
378 @section Advanced Plotting |
|
379 |
|
380 @menu |
|
381 * Graphics Objects:: |
|
382 * Graphics Object Properties:: |
6891
|
383 * Managing Default Properties:: |
6889
|
384 * Colors:: |
|
385 * Line Styles:: |
|
386 * Marker Styles:: |
6888
|
387 * Interaction with gnuplot:: |
|
388 @end menu |
|
389 |
|
390 @node Graphics Objects |
|
391 @subsection Graphics Objects |
|
392 |
|
393 Plots in Octave are constructed from the following @dfn{graphics |
|
394 objects}. Each graphics object has a set of properties that define its |
|
395 appearance and may also contain links to other graphics objects. |
|
396 Graphics objects are only referenced by a numeric index, or @dfn{handle}. |
|
397 |
|
398 @table @asis |
|
399 @item root figure |
|
400 The parent of all figure objects. The index for the root figure is |
|
401 defined to be 0. |
|
402 |
|
403 @item figure |
|
404 A figure window. |
|
405 |
|
406 @item axes |
|
407 An set of axes. This object is a child of a figure object and may be a |
|
408 parent of line, text, image, patch, or surface objects. |
|
409 |
|
410 @item line |
|
411 A line in two or three dimensions. |
|
412 |
|
413 @item text |
|
414 Text annotations. |
|
415 |
|
416 @item image |
|
417 A bitmap image. |
|
418 |
|
419 @item patch |
|
420 A filled polygon, currently limited to two dimensions. |
|
421 |
|
422 @item surface |
|
423 A three-dimensional surface. |
|
424 @end table |
|
425 |
|
426 To determine whether an object is a graphics object index or a figure |
|
427 index, use the functions @code{ishandle} and @code{isfigure}. |
|
428 |
|
429 @DOCSTRING(ishandle) |
|
430 |
|
431 @DOCSTRING(isfigure) |
|
432 |
|
433 The function @code{gcf} returns an index to the current figure object, |
|
434 or creates one if none exists. Similarly, @code{gca} returns the |
|
435 current axes object, or creates one (and its parent figure object) if |
|
436 none exists. |
|
437 |
|
438 @DOCSTRING(gcf) |
|
439 |
|
440 @DOCSTRING(gca) |
|
441 |
|
442 The @code{get} and @code{set} functions may be used to examine and set |
|
443 properties for graphics objects. For example, |
|
444 |
|
445 @example |
|
446 @group |
|
447 get (0) |
|
448 @result{} ans = |
|
449 @{ |
|
450 type = root figure |
|
451 currentfigure = [](0x0) |
|
452 children = [](0x0) |
|
453 visible = on |
|
454 @} |
|
455 @end group |
|
456 @end example |
|
457 |
|
458 @noindent |
|
459 returns a structure containing all the properties of the root figure. |
|
460 As with all functions in Octave, the structure is returned by value, so |
|
461 modifying it will not modify the internal root figure plot object. To |
|
462 do that, you must use the @code{set} function. Also, note that in this |
|
463 case, the @code{currentfigure} property is empty, which indicates that |
|
464 there is no current figure window. |
|
465 |
|
466 The @code{get} function may also be used to find the value of a single |
|
467 property. For example, |
|
468 |
|
469 @example |
|
470 @group |
|
471 get (gca (), "xlim") |
|
472 @result{} [ 0 1 ] |
|
473 @end group |
|
474 @end example |
|
475 |
|
476 @noindent |
|
477 returns the range of the x-axis for the current axes object in the |
|
478 current figure. |
|
479 |
|
480 To set graphics object properties, use the set function. For example, |
|
481 |
|
482 @example |
|
483 set (gca (), "xlim", [-10, 10]); |
|
484 @end example |
|
485 |
|
486 @noindent |
|
487 sets the range of the x-axis for the current axes object in the current |
|
488 figure to @samp{[-10, 10]}. Additionally, calling set with a graphics |
|
489 object index as the only argument returns a structure containing the |
|
490 default values for all the properties for the given object type. For |
|
491 example, |
|
492 |
|
493 @example |
|
494 set (gca ()) |
|
495 @end example |
|
496 |
|
497 @noindent |
|
498 returns a structure containing the default property values for axes |
|
499 objects. |
|
500 |
|
501 @DOCSTRING(get) |
|
502 |
|
503 @DOCSTRING(set) |
|
504 |
|
505 @DOCSTRING(ancestor) |
|
506 |
|
507 You can create axes, line, and patch objects directly using the |
|
508 @code{axes}, @code{line}, and @code{patch} functions. These objects |
|
509 become children of the current axes object. |
|
510 |
|
511 @DOCSTRING(axes) |
|
512 |
|
513 @DOCSTRING(line) |
|
514 |
|
515 @DOCSTRING(patch) |
|
516 |
7120
|
517 @DOCSTRING(surface) |
|
518 |
6888
|
519 By default, Octave refreshes the plot window when a prompt is printed, |
|
520 or when waiting for input. To force an update at other times, call the |
|
521 @code{drawnow} function. |
|
522 |
|
523 @DOCSTRING(drawnow) |
|
524 |
|
525 Normally, high-level plot functions like @code{plot} or @code{mesh} call |
|
526 @code{newplot} to initialize the state of the current axes so that the |
|
527 next plot is drawn in a blank window with default property settings. To |
|
528 have two plots superimposed over one another, call the @code{hold} |
|
529 function. For example, |
|
530 |
|
531 @example |
|
532 @group |
|
533 hold ("on"); |
|
534 x = -10:0.1:10; |
|
535 plot (x, sin (x)); |
|
536 plot (x, cos (x)); |
|
537 hold ("off"); |
|
538 @end group |
|
539 @end example |
|
540 |
|
541 @noindent |
|
542 displays sine and cosine waves on the same axes. If the hold state is |
|
543 off, consecutive plotting commands like this will only display the last |
|
544 plot. |
|
545 |
|
546 @DOCSTRING(newplot) |
|
547 |
|
548 @DOCSTRING(hold) |
|
549 |
|
550 @DOCSTRING(ishold) |
|
551 |
|
552 To clear the current figure, call the @code{clf} function. To bring it |
|
553 to the top of the window stack, call the @code{shg} function. To delete |
|
554 a graphics object, call @code{delete} on its index. To close the |
|
555 figure window, call the @code{close} function. |
|
556 |
|
557 @DOCSTRING(clf) |
|
558 |
|
559 @DOCSTRING(shg) |
|
560 |
|
561 @DOCSTRING(delete) |
|
562 |
|
563 @DOCSTRING(close) |
|
564 |
|
565 @DOCSTRING(closereq) |
|
566 |
|
567 @node Graphics Object Properties |
|
568 @subsection Graphics Object Properties |
|
569 @cindex graphics object properties |
|
570 |
|
571 @menu |
|
572 * Root Figure Properties:: |
6889
|
573 * Figure Properties:: |
6888
|
574 * Axes Properties:: |
|
575 * Line Properties:: |
|
576 * Text Properties:: |
|
577 * Image Properties:: |
|
578 * Patch Properties:: |
|
579 * Surface Properties:: |
|
580 @end menu |
|
581 |
|
582 @node Root Figure Properties |
|
583 @subsubsection Root Figure Properties |
|
584 |
|
585 @table @code |
|
586 @item currentfigure |
6889
|
587 Index to graphics object for the current figure. |
|
588 |
|
589 @c FIXME -- does this work? |
|
590 @c @item visible |
|
591 @c Either @code{"on"} or @code{"off"} to toggle display of figures. |
6888
|
592 @end table |
|
593 |
6889
|
594 @node Figure Properties |
|
595 @subsubsection Figure Properties |
6888
|
596 |
|
597 @table @code |
|
598 @item nextplot |
6889
|
599 May be one of |
|
600 @table @code |
|
601 @item "new" |
|
602 @item "add" |
|
603 @item "replace" |
|
604 @item "replacechildren" |
|
605 @end table |
|
606 |
6888
|
607 @item closerequestfcn |
6889
|
608 Handle of function to call when a figure is closed. |
|
609 |
6888
|
610 @item currentaxes |
6889
|
611 Index to graphics object of current axes. |
|
612 |
6888
|
613 @item colormap |
6889
|
614 An N-by-3 matrix containing the color map for the current axes. |
|
615 |
6888
|
616 @item visible |
6889
|
617 Either @code{"on"} or @code{"off"} to toggle display of the figure. |
|
618 |
6888
|
619 @item paperorientation |
6889
|
620 Indicates the orientation for printing. Either @code{"landscape"} or |
|
621 @code{"portrait"}. |
6888
|
622 @end table |
|
623 |
|
624 @node Axes Properties |
|
625 @subsubsection Axes Properties |
|
626 |
|
627 @table @code |
|
628 @item position |
6889
|
629 A four-element vector specifying the coordinates of the lower left |
|
630 corner and width and height of the plot, in normalized units. For |
|
631 example, @code{[0.2, 0.3, 0.4, 0.5]} sets the lower left corner of the |
7001
|
632 axes at @math{(0.2, 0.3)} and the width and height to be 0.4 and 0.5 |
6889
|
633 respectively. |
|
634 |
6888
|
635 @item title |
6889
|
636 Index of text object for the axes title. |
|
637 |
6888
|
638 @item box |
6889
|
639 Either @code{"on"} or @code{"off"} to toggle display of the box around |
|
640 the axes. |
|
641 |
6888
|
642 @item key |
6889
|
643 Either @code{"on"} or @code{"off"} to toggle display of the legend. |
|
644 Note that this property is not compatible with @sc{Matlab} and may be |
|
645 removed in a future version of Octave. |
|
646 |
6888
|
647 @item keybox |
6889
|
648 Either @code{"on"} or @code{"off"} to toggle display of a box around the |
|
649 legend. Note that this property is not compatible with @sc{Matlab} and |
|
650 may be removed in a future version of Octave. |
|
651 |
6888
|
652 @item keypos |
6889
|
653 An integer from 1 to 4 specifying the position of the legend. 1 |
|
654 indicates upper right corner, 2 indicates upper left, 3 indicates lower |
|
655 left, and 4 indicates lower right. Note that this property is not |
|
656 compatible with @sc{Matlab} and may be removed in a future version of |
|
657 Octave. |
|
658 |
6888
|
659 @item dataaspectratio |
6889
|
660 A two-element vector specifying the relative height and width of the |
|
661 data displayed in the axes. Setting @code{dataaspectratio} to @samp{1, |
|
662 2]} causes the length of one unit as displayed on the y axis to be the |
|
663 same as the length of 2 units on the x axis. Setting |
|
664 @code{dataaspectratio} also forces the @code{dataaspectratiomode} |
|
665 property to be set to @code{"manual"}. |
|
666 |
6888
|
667 @item dataaspectratiomode |
6889
|
668 Either @code{"manual"} or @code{"auto"}. |
|
669 |
6888
|
670 @item xlim |
|
671 @itemx ylim |
|
672 @itemx zlim |
|
673 @itemx clim |
6889
|
674 Two-element vectors defining the limits for the x, y, and z axes and the |
|
675 Setting one of these properties also forces the corresponding mode |
|
676 property to be set to @code{"manual"}. |
|
677 |
6888
|
678 @item xlimmode |
|
679 @itemx ylimmode |
|
680 @itemx zlimmode |
|
681 @itemx climmode |
6889
|
682 Either @code{"manual"} or @code{"auto"}. |
|
683 |
6888
|
684 @item xlabel |
|
685 @itemx ylabel |
|
686 @itemx zlabel |
6889
|
687 Indices to text objects for the axes labels. |
|
688 |
6888
|
689 @item xgrid |
|
690 @itemx ygrid |
|
691 @itemx zgrid |
6889
|
692 Either @code{"on"} or @code{"off"} to toggle display of grid lines. |
|
693 |
6888
|
694 @item xminorgrid |
|
695 @itemx yminorgrid |
|
696 @itemx zminorgrid |
6889
|
697 Either @code{"on"} or @code{"off"} to toggle display of minor grid lines. |
|
698 |
6888
|
699 @item xtick |
|
700 @itemx ytick |
|
701 @itemx ztick |
6889
|
702 Setting one of these properties also forces the corresponding mode |
|
703 property to be set to @code{"manual"}. |
|
704 |
6888
|
705 @item xtickmode |
|
706 @itemx ytickmode |
|
707 @itemx ztickmode |
6889
|
708 Either @code{"manual"} or @code{"auto"}. |
|
709 |
6888
|
710 @item xticklabel |
|
711 @itemx yticklabel |
|
712 @itemx zticklabel |
6889
|
713 Setting one of these properties also forces the corresponding mode |
|
714 property to be set to @code{"manual"}. |
|
715 |
6888
|
716 @item xticklabelmode |
|
717 @itemx yticklabelmode |
|
718 @itemx zticklabelmode |
6889
|
719 Either @code{"manual"} or @code{"auto"}. |
|
720 |
6888
|
721 @item xscale |
|
722 @itemx yscale |
|
723 @itemx zscale |
6889
|
724 Either @code{"linear"} or @code{"log"}. |
|
725 |
6888
|
726 @item xdir |
|
727 @itemx ydir |
|
728 @itemx zdir |
6889
|
729 Either @code{"forward"} or @code{"reverse"}. |
|
730 |
6888
|
731 @item xaxislocation |
|
732 @itemx yaxislocation |
6889
|
733 Either @code{"top"} or @code{"bottom"} for the x axis and @code{"left"} |
|
734 or @code{"right"} for the y axis. |
|
735 |
6888
|
736 @item view |
6889
|
737 A three element vector specifying the view point for three-dimensional plots. |
|
738 |
6888
|
739 @item visible |
6889
|
740 Either @code{"on"} or @code{"off"} to toggle display of the axes. |
|
741 |
6888
|
742 @item nextplot |
6889
|
743 May be one of |
|
744 @table @code |
|
745 @item "new" |
|
746 @item "add" |
|
747 @item "replace" |
|
748 @item "replacechildren" |
|
749 @end table |
|
750 |
6888
|
751 @item outerposition |
6889
|
752 A four-element vector specifying the coordinates of the lower left |
|
753 corner and width and height of the plot, in normalized units. For |
|
754 example, @code{[0.2, 0.3, 0.4, 0.5]} sets the lower left corner of the |
7001
|
755 axes at @math{(0.2, 0.3)} and the width and height to be 0.4 and 0.5 |
6889
|
756 respectively. |
6888
|
757 @end table |
|
758 |
|
759 @node Line Properties |
|
760 @subsubsection Line Properties |
|
761 |
|
762 @table @code |
|
763 @itemx xdata |
|
764 @itemx ydata |
|
765 @itemx zdata |
|
766 @itemx ldata |
|
767 @itemx udata |
|
768 @itemx xldata |
|
769 @itemx xudata |
6889
|
770 The data to be plotted. The @code{ldata} and @code{udata} elements are |
|
771 for errobars in the y direction, and the @code{xldata} and @code{xudata} |
|
772 elements are for errorbars in the x direction. |
|
773 |
6888
|
774 @item color |
6889
|
775 The RGB color of the line, or a color name. @xref{Colors}. |
|
776 |
6888
|
777 @item linestyle |
6889
|
778 @itemx linewidth |
|
779 @xref{Line Styles}. |
|
780 |
6888
|
781 @item marker |
|
782 @item markeredgecolor |
|
783 @item markerfacecolor |
|
784 @item markersize |
6889
|
785 @xref{Marker Styles}. |
|
786 |
6888
|
787 @item keylabel |
6889
|
788 The text of the legend entry corresponding to this line. Note that this |
|
789 property is not compatible with @sc{Matlab} and may be removed in a |
|
790 future version of Octave. |
6888
|
791 @end table |
|
792 |
|
793 @node Text Properties |
|
794 @subsubsection Text Properties |
|
795 |
|
796 @table @code |
|
797 @item string |
6889
|
798 The character string contained by the text object. |
|
799 |
6888
|
800 @item units |
6889
|
801 May be @code{"normalized"} or @code{"graph"}. |
|
802 |
6888
|
803 @item position |
6889
|
804 The coordinates of the text object. |
|
805 |
6888
|
806 @item rotation |
6889
|
807 The angle of rotation for the displayed text, measured in degrees. |
|
808 |
6888
|
809 @item horizontalalignment |
6889
|
810 May be @code{"left"}, @code{"center"}, or @code{"right"}. |
|
811 |
6888
|
812 @item color |
6889
|
813 The color of the text. @xref{Colors}. |
7189
|
814 |
|
815 @item fontname |
|
816 The font used for the text. |
|
817 |
|
818 @item fontsize |
|
819 The size of the font, in points to use. |
|
820 |
|
821 @item fontangle |
|
822 Flag whether the font is italic or normal. Valid values are 'normal', |
|
823 'italic' and 'oblique'. |
|
824 |
|
825 @item fontweight |
|
826 Flag whether the font is bold, etc. Valid values are 'normal', 'bold', |
|
827 'demi' or 'light'. |
|
828 |
|
829 @item interpreter |
|
830 Determines how the text is rendered. Valid values are 'none', 'tex' or |
|
831 'latex'. |
6888
|
832 @end table |
|
833 |
7189
|
834 All text objects, including titles, labels, legends, and text, include |
|
835 the property 'interpreter', this property determines the manner in which |
|
836 special control sequences in the text are rendered. If the interpreter |
|
837 is set to 'none', then no rendering occurs. At this point the 'latex' |
|
838 option is not implemented and so the 'latex' interpreter also does not |
|
839 interpret the text. |
|
840 |
|
841 The 'tex' option implements a subset of @sc{TeX} functionality in the |
|
842 rendering of the text. This allows the insertion of special characters |
|
843 such as Greek or mathematical symbols within the text. The special |
|
844 characters are also inserted with a code starting with the back-slash |
|
845 (\) character, as in the table @ref{tab:extended}. |
|
846 |
|
847 In addition, the formating of the text can be changed within the string |
|
848 with the codes |
|
849 |
|
850 @multitable @columnfractions .2 .2 .6 .2 |
|
851 @item @tab \bf @tab Bold font @tab |
|
852 @item @tab \it @tab Italic font @tab |
|
853 @item @tab \sl @tab Oblique Font @tab |
|
854 @item @tab \rm @tab Normal font @tab |
|
855 @end multitable |
|
856 |
|
857 These are be used in conjunction with the @{ and @} characters to limit |
|
858 the change in the font to part of the string. For example |
|
859 |
|
860 @example |
|
861 xlabel ('@{\bf H@} = a @{\bf V@}') |
|
862 @end example |
|
863 |
|
864 where the character 'a' will not appear in a bold font. Note that to |
|
865 avoid having Octave interpret the backslash characters in the strings, |
|
866 the strings should be in single quotes. |
|
867 |
|
868 It is also possible to change the fontname and size within the text |
|
869 |
|
870 @multitable @columnfractions .1 .4 .6 .1 |
|
871 @item @tab \fontname@{@var{fontname}@} @tab Specify the font to use @tab |
|
872 @item @tab \fontsize@{@var{size}@} @tab Specify the size of the font to |
|
873 use @tab |
|
874 @end multitable |
|
875 |
|
876 Finally, the superscript and subscripting can be controlled with the '^' |
|
877 and '_' characters. If the '^' or '_' is followed by a @{ character, |
|
878 then all of the block surrounded by the @{ @} pair is super- or |
|
879 sub-scripted. Without the @{ @} pair, only the character immediately |
|
880 following the '^' or '_' is super- or sub-scripted. |
|
881 |
|
882 @float Table,tab:extended |
|
883 @iftex |
|
884 @tex |
|
885 \vskip 6pt |
|
886 {\hbox to \hsize {\hfill\vbox{\offinterlineskip \tabskip=0pt |
|
887 \halign{ |
|
888 \vrule height2.0ex depth1.ex width 0.6pt #\tabskip=0.3em & |
|
889 # \hfil & \vrule # & # \hfil & # \vrule & |
|
890 # \hfil & \vrule # & # \hfil & # \vrule & |
|
891 # \hfil & \vrule # & # \hfil & # \vrule |
|
892 width 0.6pt \tabskip=0pt\cr |
|
893 \noalign{\hrule height 0.6pt} |
|
894 & Code && Sym && Code && Sym && Code && Sym &\cr |
|
895 \noalign{\hrule} |
|
896 & $\backslash$forall && $\forall$ && $\backslash$exists && $\exists$ && $\backslash$ni && $\ni$ &\cr |
|
897 & $\backslash$cong && $\cong$ && $\backslash$Delta && $\Delta$ && $\backslash$Phi && $\Phi$ &\cr |
|
898 & $\backslash$Gamma && $\Gamma$ && $\backslash$vartheta && $\vartheta$ && $\backslash$Lambda && $\Lambda$ &\cr |
|
899 & $\backslash$Pi && $\Pi$ && $\backslash$Theta && $\Theta$ && $\backslash$Sigma && $\Sigma$ &\cr |
|
900 & $\backslash$varsigma && $\varsigma$ && $\backslash$Omega && $\Omega$ && $\backslash$Xi && $\Xi$ &\cr |
|
901 & $\backslash$Psi && $\Psi$ && $\backslash$perp && $\perp$ && $\backslash$alpha && $\alpha$ &\cr |
|
902 & $\backslash$beta && $\beta$ && $\backslash$chi && $\chi$ && $\backslash$delta && $\delta$ &\cr |
|
903 & $\backslash$epsilon && $\epsilon$ && $\backslash$phi && $\phi$ && $\backslash$gamma && $\gamma$ &\cr |
|
904 & $\backslash$eta && $\eta$ && $\backslash$iota && $\iota$ && $\backslash$kappa && $\kappa$ &\cr |
|
905 & $\backslash$lambda && $\lambda$ && $\backslash$mu && $\mu$ && $\backslash$nu && $\nu$ &\cr |
|
906 & $\backslash$o && $\o$ && $\backslash$pi && $\pi$ && $\backslash$theta && $\theta$ &\cr |
|
907 & $\backslash$rho && $\rho$ && $\backslash$sigma && $\sigma$ && $\backslash$tau && $\tau$ &\cr |
|
908 & $\backslash$upsilon && $\upsilon$ && $\backslash$varpi && $\varpi$ && $\backslash$omega && $\omega$ &\cr |
|
909 & $\backslash$xi && $\xi$ && $\backslash$psi && $\psi$ && $\backslash$zeta && $\zeta$ &\cr |
|
910 & $\backslash$sim && $\sim$ && $\backslash$Upsilon && $\Upsilon$ && $\backslash$prime && $\prime$ &\cr |
|
911 & $\backslash$leq && $\leq$ && $\backslash$infty && $\infty$ && $\backslash$clubsuit && $\clubsuit$ &\cr |
|
912 & $\backslash$diamondsuit && $\diamondsuit$ && $\backslash$heartsuit && $\heartsuit$ && $\backslash$spadesuit && $\spadesuit$ &\cr |
|
913 & $\backslash$leftrightarrow && $\leftrightarrow$ && $\backslash$leftarrow && $\leftarrow$ && $\backslash$uparrow && $\uparrow$ &\cr |
|
914 & $\backslash$rightarrow && $\rightarrow$ && $\backslash$downarrow && $\downarrow$ && $\backslash$circ && $\circ$ &\cr |
|
915 & $\backslash$pm && $\pm$ && $\backslash$geq && $\geq$ && $\backslash$times && $\times$ &\cr |
|
916 & $\backslash$propto && $\propto$ && $\backslash$partial && $\partial$ && $\backslash$bullet && $\bullet$ &\cr |
|
917 & $\backslash$div && $\div$ && $\backslash$neq && $\neq$ && $\backslash$equiv && $\equiv$ &\cr |
|
918 & $\backslash$approx && $\approx$ && $\backslash$ldots && $\ldots$ && $\backslash$mid && $\mid$ &\cr |
|
919 & $\backslash$aleph && $\aleph$ && $\backslash$Im && $\Im$ && $\backslash$Re && $\Re$ &\cr |
|
920 & $\backslash$wp && $\wp$ && $\backslash$otimes && $\otimes$ && $\backslash$oplus && $\oplus$ &\cr |
|
921 & $\backslash$oslash && $\oslash$ && $\backslash$cap && $\cap$ && $\backslash$cup && $\cup$ &\cr |
|
922 & $\backslash$supset && $\supset$ && $\backslash$supseteq && $\supseteq$ && $\backslash$subset && $\subset$ &\cr |
|
923 & $\backslash$subseteq && $\subseteq$ && $\backslash$in && $\in$ && $\backslash$langle && $\langle$ &\cr |
|
924 & $\backslash$rangle && $\rangle$ && $\backslash$nabla && $\nabla$ && $\backslash$surd && $\surd$ &\cr |
|
925 & $\backslash$cdot && $\cdot$ && $\backslash$neg && $\neg$ && $\backslash$wedge && $\wedge$ &\cr |
|
926 & $\backslash$vee && $\vee$ && $\backslash$copyright && $\copyright$ && $\backslash$rfloor && $\rfloor$ &\cr |
|
927 & $\backslash$lceil && $\lceil$ && $\backslash$lfloor && $\lfloor$ && $\backslash$rceil && $\rceil$ &\cr |
|
928 & $\backslash$int && $\int$ && && && && &\cr |
|
929 \noalign{\hrule height 0.6pt} |
|
930 }}\hfill}} |
|
931 @end tex |
|
932 @end iftex |
|
933 @ifnottex |
|
934 @multitable @columnfractions .125 .25 .25 .25 .125 |
|
935 @item @tab \forall @tab \exists @tab \ni @tab |
|
936 @item @tab \cong @tab \Delta @tab \Phi @tab |
|
937 @item @tab \Gamma @tab \vartheta @tab \Lambda @tab |
|
938 @item @tab \Pi @tab \Theta @tab \Sigma @tab |
|
939 @item @tab \varsigma @tab \Omega @tab \Xi @tab |
|
940 @item @tab \Psi @tab \perp @tab \alpha @tab |
|
941 @item @tab \beta @tab \chi @tab \delta @tab |
|
942 @item @tab \epsilon @tab \phi @tab \gamma @tab |
|
943 @item @tab \eta @tab \iota @tab \kappa @tab |
|
944 @item @tab \lambda @tab \mu @tab \nu @tab |
|
945 @item @tab \o @tab \pi @tab \theta @tab |
|
946 @item @tab \rho @tab \sigma @tab \tau @tab |
|
947 @item @tab \upsilon @tab \varpi @tab \omega @tab |
|
948 @item @tab \xi @tab \psi @tab \zeta @tab |
|
949 @item @tab \sim @tab \Upsilon @tab \prime @tab |
|
950 @item @tab \leq @tab \infty @tab \clubsuit @tab |
|
951 @item @tab \diamondsuit @tab \heartsuit @tab \spadesuit @tab |
|
952 @item @tab \leftrightarrow @tab \leftarrow @tab \uparrow @tab |
|
953 @item @tab \rightarrow @tab \downarrow @tab \circ @tab |
|
954 @item @tab \pm @tab \geq @tab \times @tab |
|
955 @item @tab \propto @tab \partial @tab \bullet @tab |
|
956 @item @tab \div @tab \neq @tab \equiv @tab |
|
957 @item @tab \approx @tab \ldots @tab \mid @tab |
|
958 @item @tab \aleph @tab \Im @tab \Re @tab |
|
959 @item @tab \wp @tab \otimes @tab \oplus @tab |
|
960 @item @tab \oslash @tab \cap @tab \cup @tab |
|
961 @item @tab \supset @tab \supseteq @tab \subset @tab |
|
962 @item @tab \subseteq @tab \in @tab \langle @tab |
|
963 @item @tab \rangle @tab \nabla @tab \surd @tab |
|
964 @item @tab \cdot @tab \neg @tab \wedge @tab |
|
965 @item @tab \vee @tab \copyright @tab \rfloor @tab |
|
966 @item @tab \lceil @tab \lfloor @tab \rceil @tab |
|
967 @item @tab \int @tab @tab @tab |
|
968 @end multitable |
|
969 @end ifnottex |
|
970 @caption{Available special characters in @sc{TeX} mode} |
|
971 @end float |
|
972 |
|
973 A complete example showing the capabilities of the extended text is |
|
974 |
|
975 @example |
|
976 @group |
|
977 x = 0:0.01:3; |
|
978 plot(x,erf(x)); |
|
979 hold on; |
|
980 plot(x,x,"r"); |
|
981 axis([0, 3, 0, 1]); |
|
982 text(0.65, 0.6175, strcat('\leftarrow x = @{2/\surd\pi', |
|
983 ' @{\fontsize@{16@}\int_@{\fontsize@{8@}0@}^@{\fontsize@{8@}x@}@}', |
|
984 ' e^@{-t^2@} dt@} = 0.6175')) |
|
985 @end group |
|
986 @end example |
|
987 |
|
988 @ifnotinfo |
|
989 @noindent |
|
990 The result of which can be seen in @ref{fig:extendedtext} |
|
991 |
|
992 @float Figure,fig:extendedtext |
|
993 @image{extended,8cm} |
|
994 @caption{Example of inclusion of text with the @sc{TeX} interpreter} |
|
995 @end float |
|
996 @end ifnotinfo |
|
997 |
6888
|
998 @node Image Properties |
|
999 @subsubsection Image Properties |
|
1000 |
|
1001 @table @code |
|
1002 @item cdata |
6889
|
1003 The data for the image. Each pixel of the image corresponds to an |
|
1004 element of @code{cdata}. The value of an element of @code{cdata} |
|
1005 specifies the row-index into the colormap of the axes object containing |
|
1006 the image. The color value found in the color map for the given index |
|
1007 determines the color of the pixel. |
|
1008 |
|
1009 @item xdata |
6888
|
1010 @itemx ydata |
7001
|
1011 Two-element vectors specifying the range of the x- and y- coordinates for |
6889
|
1012 the image. |
6888
|
1013 @end table |
|
1014 |
|
1015 @node Patch Properties |
|
1016 @subsubsection Patch Properties |
|
1017 |
|
1018 @table @code |
|
1019 @item cdata |
|
1020 @itemx xdata |
|
1021 @itemx ydata |
|
1022 @itemx zdata |
6889
|
1023 Data defining the patch object. |
|
1024 |
6888
|
1025 @item facecolor |
6889
|
1026 The fill color of the patch. @xref{Colors}. |
|
1027 |
6888
|
1028 @item facealpha |
6889
|
1029 A number in the range [0, 1] indicating the transparency of the patch. |
|
1030 |
6888
|
1031 @item edgecolor |
6889
|
1032 The color of the line defining the patch. @xref{Colors}. |
|
1033 |
6888
|
1034 @item linestyle |
6889
|
1035 @itemx linewidth |
|
1036 @xref{Line Styles}. |
|
1037 |
6888
|
1038 @item marker |
6889
|
1039 @itemx markeredgecolor |
|
1040 @itemx markerfacecolor |
|
1041 @itemx markersize |
|
1042 @xref{Marker Styles}. |
6888
|
1043 @end table |
|
1044 |
|
1045 @node Surface Properties |
|
1046 @subsubsection Surface Properties |
|
1047 |
|
1048 @table @code |
|
1049 @item xdata |
|
1050 @itemx ydata |
|
1051 @itemx zdata |
6889
|
1052 The data determining the surface. The @code{xdata} and @code{ydata} |
|
1053 elements are vectors and @code{zdata} must be a matrix. |
|
1054 |
6888
|
1055 @item keylabel |
6889
|
1056 The text of the legend entry corresponding to this surface. Note that |
|
1057 this property is not compatible with @sc{Matlab} and may be removed in a |
|
1058 future version of Octave. |
|
1059 @end table |
|
1060 |
6891
|
1061 @node Managing Default Properties |
|
1062 @subsection Managing Default Properties |
|
1063 |
6892
|
1064 Object properties have two classes of default values, @dfn{factory |
|
1065 defaults} (the initial values) and @dfn{user-defined defaults}, which |
|
1066 may override the factory defaults. |
6891
|
1067 |
|
1068 Although default values may be set for any object, they are set in |
|
1069 parent objects and apply to child objects. For example, |
|
1070 |
|
1071 @example |
|
1072 set (0, "defaultlinecolor", "green"); |
|
1073 @end example |
|
1074 |
|
1075 @noindent |
|
1076 sets the default line color for all objects. The rule for constructing |
|
1077 the property name to set a default value is |
|
1078 |
|
1079 @example |
|
1080 default + @var{object-type} + @var{property-name} |
|
1081 @end example |
|
1082 |
|
1083 This rule can lead to some strange looking names, for example |
|
1084 @code{defaultlinelinewidth"} specifies the default @code{linewidth} |
|
1085 property for @code{line} objects. |
|
1086 |
|
1087 The example above used the root figure object, 0, so the default |
|
1088 property value will apply to all line objects. However, default values |
|
1089 are hierarchical, so defaults set in a figure objects override those |
|
1090 set in the root figure object. Likewise, defaults set in axes objects |
|
1091 override those set in figure or root figure objects. For example, |
|
1092 |
|
1093 @example |
|
1094 @group |
|
1095 subplot (2, 1, 1); |
|
1096 set (0, "defaultlinecolor", "red"); |
|
1097 set (1, "defaultlinecolor", "green"); |
|
1098 set (gca (), "defaultlinecolor", "blue"); |
|
1099 line (1:10, rand (1, 10)); |
|
1100 subplot (2, 1, 2); |
|
1101 line (1:10, rand (1, 10)); |
|
1102 figure (2) |
|
1103 line (1:10, rand (1, 10)); |
|
1104 @end group |
|
1105 @end example |
|
1106 |
|
1107 @noindent |
|
1108 produces two figures. The line in first subplot window of the first |
|
1109 figure is blue because it inherits its color from its parent axes |
|
1110 object. The line in the second subplot window of the first figure is |
|
1111 green because it inherits its color from its parent figure object. The |
|
1112 line in the second figure window is red because it inherits its color |
|
1113 from the global root figure parent object. |
|
1114 |
|
1115 To remove a user-defined default setting, set the default property to |
|
1116 the value @code{"remove"}. For example, |
|
1117 |
|
1118 @example |
|
1119 set (gca (), "defaultlinecolor", "remove"); |
|
1120 @end example |
|
1121 |
|
1122 @noindent |
|
1123 removes the user-defined default line color setting from the current axes |
|
1124 object. |
|
1125 |
|
1126 Getting the @code{"default"} property of an object returns a list of |
|
1127 user-defined defaults set for the object. For example, |
|
1128 |
|
1129 @example |
|
1130 get (gca (), "default"); |
|
1131 @end example |
|
1132 |
|
1133 @noindent |
|
1134 returns a list of user-defined default values for the current axes |
|
1135 object. |
|
1136 |
|
1137 Factory default values are stored in the root figure object. The |
|
1138 command |
|
1139 |
|
1140 @example |
|
1141 get (0, "factory"); |
|
1142 @end example |
|
1143 |
|
1144 @noindent |
|
1145 returns a list of factory defaults. |
|
1146 |
6889
|
1147 @node Colors |
|
1148 @subsection Colors |
|
1149 |
|
1150 Colors may be specified as RGB triplets with values ranging from zero to |
|
1151 one, or by name. Recognized color names include @code{"blue"}, |
|
1152 @code{"black"}, @code{"cyan"}, @code{"green"}, @code{"magenta"}, |
|
1153 @code{"red"}, @code{"white"}, and @code{"yellow"}. |
|
1154 |
|
1155 @node Line Styles |
|
1156 @subsection Line Styles |
7001
|
1157 Line styles are specified by the following properties: |
6889
|
1158 |
|
1159 @table @code |
|
1160 @item linestyle |
|
1161 May be one of |
|
1162 @table @code |
|
1163 @item "-" |
|
1164 Solid lines. |
|
1165 @item "--" |
|
1166 Dashed lines. |
|
1167 @item ":" |
|
1168 Points. |
|
1169 @item "-." |
|
1170 A dash-dot line. |
|
1171 @end table |
|
1172 |
|
1173 @item linewidth |
|
1174 A number specifying the width of the line. The default is 1. A value |
|
1175 of 2 is twice as wide as the default, etc. |
|
1176 @end table |
|
1177 |
|
1178 @node Marker Styles |
|
1179 @subsection Marker Styles |
7001
|
1180 Marker styles are specified by the following properties: |
6889
|
1181 @table @code |
|
1182 @item marker |
|
1183 A character indicating a plot marker to be place at each data point, or |
|
1184 @code{"none"}, meaning no markers should be displayed. |
|
1185 |
|
1186 @itemx markeredgecolor |
|
1187 The color of the edge around the marker, or @code{"auto"}, meaning that |
|
1188 the edge color is the same as the face color. @xref{Colors}. |
|
1189 |
|
1190 @itemx markerfacecolor |
|
1191 The color of the marker, or @code{"none"} to indicate that the marker |
|
1192 should not be filled. @xref{Colors}. |
|
1193 |
|
1194 @itemx markersize |
|
1195 A number specifying the size of the marker. The default is 1. A value |
|
1196 of 2 is twice as large as the default, etc. |
6888
|
1197 @end table |
|
1198 |
4167
|
1199 @node Interaction with gnuplot |
6888
|
1200 @subsection Interaction with @code{gnuplot} |
3428
|
1201 |
|
1202 @DOCSTRING(gnuplot_binary) |
|
1203 |
6331
|
1204 @DOCSTRING(gnuplot_use_title_option) |