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 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745
|
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Plot Annotations (GNU Octave (version 10.3.0))</title>
<meta name="description" content="Plot Annotations (GNU Octave (version 10.3.0))">
<meta name="keywords" content="Plot Annotations (GNU Octave (version 10.3.0))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="High_002dLevel-Plotting.html" rel="up" title="High-Level Plotting">
<link href="Multiple-Plots-on-One-Page.html" rel="next" title="Multiple Plots on One Page">
<link href="Three_002dDimensional-Plots.html" rel="prev" title="Three-Dimensional Plots">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
div.example {margin-left: 3.2em}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
ul.mark-bullet {list-style-type: disc}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">
</head>
<body lang="en">
<div class="subsection-level-extent" id="Plot-Annotations">
<div class="nav-panel">
<p>
Next: <a href="Multiple-Plots-on-One-Page.html" accesskey="n" rel="next">Multiple Plots on One Page</a>, Previous: <a href="Three_002dDimensional-Plots.html" accesskey="p" rel="prev">Three-Dimensional Plots</a>, Up: <a href="High_002dLevel-Plotting.html" accesskey="u" rel="up">High-Level Plotting</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="Plot-Annotations-1"><span>15.2.3 Plot Annotations<a class="copiable-link" href="#Plot-Annotations-1"> ¶</a></span></h4>
<p>You can add titles, axis labels, legends, and arbitrary text to an
existing plot. For example:
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">x = -10:0.1:10;
plot (x, sin (x));
title ("sin(x) for x = -10:0.1:10");
xlabel ("x");
ylabel ("sin (x)");
text (pi, 0.7, "arbitrary text");
legend ("sin (x)");
</pre></div></div>
<p>The functions <code class="code">grid</code> and <code class="code">box</code> may also be used to add grid
and border lines to the plot. By default, the grid is off and the
border lines are on.
</p>
<p>Finally, arrows, text and rectangular or elliptic boxes can be added to
highlight parts of a plot using the <code class="code">annotation</code> function. Those objects
are drawn in an invisible axes, on top of every other axes.
</p>
<a class="anchor" id="XREFtitle"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-title"><span><strong class="def-name">title</strong> <code class="def-code-arguments">(<var class="var">string</var>)</code><a class="copiable-link" href="#index-title"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-title-1"><span><strong class="def-name">title</strong> <code class="def-code-arguments">(<var class="var">string</var>, <var class="var">prop</var>, <var class="var">val</var>, …)</code><a class="copiable-link" href="#index-title-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-title-2"><span><strong class="def-name">title</strong> <code class="def-code-arguments">(<var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-title-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-title-3"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">title</strong> <code class="def-code-arguments">(…)</code><a class="copiable-link" href="#index-title-3"> ¶</a></span></dt>
<dd><p>Specify the string used as a title for the current axis.
</p>
<p>An optional list of <var class="var">property</var>/<var class="var">value</var> pairs can be used to change
the appearance of the created title text object.
</p>
<p>If the first argument <var class="var">hax</var> is an axes or legend handle, then add a
title to this object, rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="var">h</var> is a graphics handle to the created text
object.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFxlabel">xlabel</a>, <a class="ref" href="#XREFylabel">ylabel</a>, <a class="ref" href="#XREFzlabel">zlabel</a>, <a class="ref" href="#XREFtext">text</a>.
</p></dd></dl>
<a class="anchor" id="XREFlegend"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-legend"><span><strong class="def-name">legend</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-legend"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-1"><span><strong class="def-name">legend</strong> <code class="def-code-arguments"><var class="var">command</var></code><a class="copiable-link" href="#index-legend-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-2"><span><strong class="def-name">legend</strong> <code class="def-code-arguments">(<var class="var">str1</var>, <var class="var">str2</var>, …)</code><a class="copiable-link" href="#index-legend-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-3"><span><strong class="def-name">legend</strong> <code class="def-code-arguments">(<var class="var">charmat</var>)</code><a class="copiable-link" href="#index-legend-3"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-4"><span><strong class="def-name">legend</strong> <code class="def-code-arguments">({<var class="var">cellstr</var>})</code><a class="copiable-link" href="#index-legend-4"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-5"><span><strong class="def-name">legend</strong> <code class="def-code-arguments">(…, <var class="var">property</var>, <var class="var">value</var>, …)</code><a class="copiable-link" href="#index-legend-5"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-6"><span><strong class="def-name">legend</strong> <code class="def-code-arguments">(<var class="var">hobjs</var>, …)</code><a class="copiable-link" href="#index-legend-6"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-7"><span><strong class="def-name">legend</strong> <code class="def-code-arguments">("<var class="var">command</var>")</code><a class="copiable-link" href="#index-legend-7"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-8"><span><strong class="def-name">legend</strong> <code class="def-code-arguments">(<var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-legend-8"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-9"><span><strong class="def-name">legend</strong> <code class="def-code-arguments">(<var class="var">hleg</var>, …)</code><a class="copiable-link" href="#index-legend-9"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-legend-10"><span><code class="def-type"><var class="var">hleg</var> =</code> <strong class="def-name">legend</strong> <code class="def-code-arguments">(…)</code><a class="copiable-link" href="#index-legend-10"> ¶</a></span></dt>
<dd>
<p>Display a legend for the current axes using the specified strings as labels.
</p>
<p>Legend entries may be specified as individual character string arguments,
a character array, or a cell array of character strings. When label names
might be confused with legend properties, or <var class="var">command</var> arguments,
the labels should be protected by specifying them as a cell array of
strings.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then add a legend to this
axes, rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>If the first argument <var class="var">hleg</var> is a legend handle, then operate on this
legend rather than the legend of the current axes.
</p>
<p>Legend labels are associated with the axes’ children; The first label is
assigned to the first object that was plotted in the axes, the second label
to the next object plotted, etc. To label specific data objects, without
labeling all objects, provide their graphic handles in the input
<var class="var">hobjs</var>.
</p>
<p>The following customizations are available using <var class="var">command</var>:
</p>
<dl class="table">
<dt><code class="code">"show"</code></dt>
<dd><p>Show legend on the plot
</p>
</dd>
<dt><code class="code">"hide"</code></dt>
<dd><p>Hide legend on the plot
</p>
</dd>
<dt><code class="code">"toggle"</code></dt>
<dd><p>Toggle between <code class="code">"hide"</code> and <code class="code">"show"</code>
</p>
</dd>
<dt><code class="code">"boxon"</code></dt>
<dd><p>Show a box around legend (default)
</p>
</dd>
<dt><code class="code">"boxoff"</code></dt>
<dd><p>Hide the box around legend
</p>
</dd>
<dt><code class="code">"right"</code></dt>
<dd><p>Place label text to the right of the keys (default)
</p>
</dd>
<dt><code class="code">"left"</code></dt>
<dd><p>Place label text to the left of the keys
</p>
</dd>
<dt><code class="code">"off"</code></dt>
<dd><p>Delete the legend object
</p></dd>
</dl>
<p>The <code class="code">legend</code> function creates a graphics object which has various
properties that can be manipulated with <code class="code">get</code>/<code class="code">set</code>.
Alternatively, properties can be set directly when calling <code class="code">legend</code> by
including <var class="var">property</var>/<var class="var">value</var> pairs. If using this calling form, the
labels must be specified as a cell array of strings. Graphics object
properties are documented in detail at <a class="ref" href="Graphics-Object-Properties.html">Graphics Object Properties</a>.
</p>
<p>Following is a subset of supported legend properties:
</p>
<dl class="table">
<dt><code class="code">autoupdate</code>: <code class="code">"off"</code> | {<code class="code">"on"</code>}</dt>
<dd><p>Control whether the number of legend items is updated automatically when
objects are added to (or deleted from) the peer axes. For example:
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">## Create a single plot with its legend.
figure ();
plot (1:10);
legend ("Slope 1");
## Add another plot and specify its displayname so that
## the legend is correctly updated.
hold on;
plot ((1:10) * 2, "displayname", "Slope 2");
## Stop automatic updates for further plots.
legend ("autoupdate", "off");
plot ((1:10) * 3);
</pre></div></div>
</dd>
<dt><code class="code">box</code>: <code class="code">"off"</code> | {<code class="code">"on"</code>}</dt>
<dd><p>Control whether the legend has a surrounding box.
</p>
</dd>
<dt><code class="code">location</code>: <code class="code">"best"</code> | <code class="code">"bestoutside"</code> |</dt>
<dd><p><code class="code">"east"</code> | <code class="code">"eastoutside"</code> | <code class="code">"none"</code> | <code class="code">"north"</code> |
{<code class="code">"northeast"</code>} | <code class="code">"northeastoutside"</code> |
<code class="code">"northoutside"</code> | <code class="code">"northwest"</code>| <code class="code">"northwestoutside"</code> |
<code class="code">"south"</code> | <code class="code">"southeast"</code> | <code class="code">"southeastoutside"</code> |
<code class="code">"southoutside"</code> | <code class="code">"southwest"</code> | <code class="code">"southwestoutside"</code> |
<code class="code">"west"</code> | <code class="code">"westoutside"</code>
Control the location of the legend.
</p>
</dd>
<dt><code class="code">numcolumns</code>: scalar interger, def. <code class="code">1</code></dt>
<dd><p>Control the number of columns used in the layout of the legend items.
For example:
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">figure ();
plot (rand (30));
legend ("numcolumns", 3);
</pre></div></div>
<p>Setting <code class="code">numcolumns</code> also forces the <code class="code">numcolumnsmode</code> property
to be set to <code class="code">"manual"</code>.
</p>
</dd>
<dt><code class="code">orientation</code>: <code class="code">"horizontal"</code> | {<code class="code">"vertical"</code>}</dt>
<dd><p>Control whether the legend items are arranged vertically (column-wise) or
horizontally (row-wise).
</p>
</dd>
<dt><code class="code">string</code>: string | cell array of strings</dt>
<dd><p>List of labels for the legend items. For example:
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">figure ();
plot (rand (20));
## Let legend choose names automatically
hl = legend ();
## Selectively change some names
str = get (hl, "string");
str(1:5:end) = "Garbage";
set (hl, "string", str);
</pre></div></div>
</dd>
<dt><code class="code">textcolor</code>: colorspec, def. <code class="code">[0 0 0]</code></dt>
<dd><p>Control the color of the text strings for legend item.
</p>
</dd>
</dl>
<p>The full list of supported legend specific properties can be found at
<a class="ref" href="Legend-Properties.html">Legend Properties</a>.
</p>
<p>A legend is implemented as an additional axes object with the <code class="code">tag</code>
property set to <code class="code">"legend"</code>. Properties of the legend object may be
manipulated directly by using <code class="code">set</code>.
</p>
<p>The optional output value <var class="var">hleg</var> is a handle to the legend object.
</p>
<p>Implementation Note: The legend label text is either provided in the call to
<code class="code">legend</code> or is taken from the <code class="code">DisplayName</code> property of the
graphics objects. Only data objects, such as line, patch, and surface, have
this property whereas axes, figures, etc. do not so they are never present
in a legend. If no labels or <code class="code">DisplayName</code> properties are available,
then the label text is simply <code class="code">"data1"</code>, <code class="code">"data2"</code>, …,
<code class="code">"dataN"</code>.
</p>
<p>The legend <code class="code">FontSize</code> property is initially set to 90% of the axes
<code class="code">FontSize</code> to which it is attached. Use <code class="code">set</code> to override this
if necessary.
</p></dd></dl>
<a class="anchor" id="XREFtext"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-text"><span><strong class="def-name">text</strong> <code class="def-code-arguments">(<var class="var">x</var>, <var class="var">y</var>, <var class="var">string</var>)</code><a class="copiable-link" href="#index-text"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-text-1"><span><strong class="def-name">text</strong> <code class="def-code-arguments">(<var class="var">x</var>, <var class="var">y</var>, <var class="var">z</var>, <var class="var">string</var>)</code><a class="copiable-link" href="#index-text-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-text-2"><span><strong class="def-name">text</strong> <code class="def-code-arguments">(…, <var class="var">prop</var>, <var class="var">val</var>, …)</code><a class="copiable-link" href="#index-text-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-text-3"><span><strong class="def-name">text</strong> <code class="def-code-arguments">(<var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-text-3"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-text-4"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">text</strong> <code class="def-code-arguments">(…)</code><a class="copiable-link" href="#index-text-4"> ¶</a></span></dt>
<dd><p>Create a text object with text <var class="var">string</var> at position <var class="var">x</var>, <var class="var">y</var>,
(<var class="var">z</var>) on the current axes.
</p>
<p>Multiple locations can be specified if <var class="var">x</var>, <var class="var">y</var>, (<var class="var">z</var>) are
vectors. Multiple strings can be specified with a character matrix or
a cell array of strings.
</p>
<p>Optional property/value pairs may be used to control the appearance of the
text.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then add text to this
axes, rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="var">h</var> is a vector of graphics handles to the
created text objects.
</p>
<p>Example 1 : multi-line text via 3 different methods
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">text (0.5, 0.8, {"Line 1", "Line 2"})
text (0.5, 0.6, ["Line 1"; "Line 2"])
text (0.5, 0.4, "Line 1\nLine 2")
</pre></div></div>
<p>Example 2 : text at multiple locations
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">text ([0.2, 0.2], [0.8, 0.6], "Same text at two locations")
text ([0.4, 0.4], [0.8, 0.6], {"Point 1 Text", "Point 2 text"})
text ([0.6, 0.6], [0.8, 0.6], {{"Point 1 Line 1", "Point 1 Line 2},
"Point 2 text"})
</pre></div></div>
<p>Example 2 : adjust appearance using text properties
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">ht = text (0.5, 0.5, "Hello World", "fontsize", 20);
set (ht, "color", "red");
</pre></div></div>
<p>Programming Notes: The full list of properties is documented at
<a class="ref" href="Text-Properties.html">Text Properties</a>.
</p>
<p>Any numeric entries in a cell array will be converted to text using
<code class="code">sprintf ("%g")</code>. For more precise control of the appearance convert
any numeric entries to strings using <code class="code">num2str</code>, <code class="code">sprintf</code>, etc.,
before calling <code class="code">text</code>.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="Interacting-with-Plots.html#XREFgtext">gtext</a>, <a class="ref" href="#XREFtitle">title</a>, <a class="ref" href="#XREFxlabel">xlabel</a>, <a class="ref" href="#XREFylabel">ylabel</a>, <a class="ref" href="#XREFzlabel">zlabel</a>.
</p></dd></dl>
<a class="anchor" id="XREFxlabel"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-xlabel"><span><strong class="def-name">xlabel</strong> <code class="def-code-arguments">(<var class="var">string</var>)</code><a class="copiable-link" href="#index-xlabel"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-xlabel-1"><span><strong class="def-name">xlabel</strong> <code class="def-code-arguments">(<var class="var">string</var>, <var class="var">property</var>, <var class="var">val</var>, …)</code><a class="copiable-link" href="#index-xlabel-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-xlabel-2"><span><strong class="def-name">xlabel</strong> <code class="def-code-arguments">(<var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-xlabel-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-xlabel-3"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">xlabel</strong> <code class="def-code-arguments">(…)</code><a class="copiable-link" href="#index-xlabel-3"> ¶</a></span></dt>
<dd><p>Specify the string used to label the x-axis of the current axis.
</p>
<p>An optional list of <var class="var">property</var>/<var class="var">value</var> pairs can be used to change
the properties of the created text label.
</p>
<p>The full list of text object properties is documented at
<a class="ref" href="Text-Properties.html">Text Properties</a>.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then operate on
this axes rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="var">h</var> is a graphics handle to the created text
object.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFylabel">ylabel</a>, <a class="ref" href="#XREFzlabel">zlabel</a>, <a class="ref" href="Timing-Utilities.html#XREFdatetick">datetick</a>, <a class="ref" href="#XREFtitle">title</a>, <a class="ref" href="#XREFtext">text</a>.
</p></dd></dl>
<a class="anchor" id="XREFylabel"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-ylabel"><span><strong class="def-name">ylabel</strong> <code class="def-code-arguments">(<var class="var">string</var>)</code><a class="copiable-link" href="#index-ylabel"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ylabel-1"><span><strong class="def-name">ylabel</strong> <code class="def-code-arguments">(<var class="var">string</var>, <var class="var">property</var>, <var class="var">val</var>, …)</code><a class="copiable-link" href="#index-ylabel-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ylabel-2"><span><strong class="def-name">ylabel</strong> <code class="def-code-arguments">(<var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-ylabel-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ylabel-3"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">ylabel</strong> <code class="def-code-arguments">(…)</code><a class="copiable-link" href="#index-ylabel-3"> ¶</a></span></dt>
<dd><p>Specify the string used to label the y-axis of the current axis.
</p>
<p>If <var class="var">hax</var> is specified then label the axis defined by <var class="var">hax</var>.
</p>
<p>An optional list of <var class="var">property</var>/<var class="var">value</var> pairs can be used to change
the properties of the created text label.
</p>
<p>The full list of text object properties is documented at
<a class="ref" href="Text-Properties.html">Text Properties</a>.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then operate on
this axes rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="var">h</var> is a graphics handle to the created text
object.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFxlabel">xlabel</a>, <a class="ref" href="#XREFzlabel">zlabel</a>, <a class="ref" href="Timing-Utilities.html#XREFdatetick">datetick</a>, <a class="ref" href="#XREFtitle">title</a>, <a class="ref" href="#XREFtext">text</a>.
</p></dd></dl>
<a class="anchor" id="XREFzlabel"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-zlabel"><span><strong class="def-name">zlabel</strong> <code class="def-code-arguments">(<var class="var">string</var>)</code><a class="copiable-link" href="#index-zlabel"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-zlabel-1"><span><strong class="def-name">zlabel</strong> <code class="def-code-arguments">(<var class="var">string</var>, <var class="var">property</var>, <var class="var">val</var>, …)</code><a class="copiable-link" href="#index-zlabel-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-zlabel-2"><span><strong class="def-name">zlabel</strong> <code class="def-code-arguments">(<var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-zlabel-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-zlabel-3"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">zlabel</strong> <code class="def-code-arguments">(…)</code><a class="copiable-link" href="#index-zlabel-3"> ¶</a></span></dt>
<dd><p>Specify the string used to label the z-axis of the current axis.
</p>
<p>An optional list of <var class="var">property</var>/<var class="var">value</var> pairs can be used to change
the properties of the created text label.
</p>
<p>The full list of text object properties is documented at
<a class="ref" href="Text-Properties.html">Text Properties</a>.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then operate on
this axes rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="var">h</var> is a graphics handle to the created text
object.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFxlabel">xlabel</a>, <a class="ref" href="#XREFylabel">ylabel</a>, <a class="ref" href="Timing-Utilities.html#XREFdatetick">datetick</a>, <a class="ref" href="#XREFtitle">title</a>, <a class="ref" href="#XREFtext">text</a>.
</p></dd></dl>
<a class="anchor" id="XREFclabel"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-clabel"><span><strong class="def-name">clabel</strong> <code class="def-code-arguments">(<var class="var">c</var>, <var class="var">h</var>)</code><a class="copiable-link" href="#index-clabel"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-clabel-1"><span><strong class="def-name">clabel</strong> <code class="def-code-arguments">(<var class="var">c</var>, <var class="var">h</var>, <var class="var">v</var>)</code><a class="copiable-link" href="#index-clabel-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-clabel-2"><span><strong class="def-name">clabel</strong> <code class="def-code-arguments">(<var class="var">c</var>, <var class="var">h</var>, "manual")</code><a class="copiable-link" href="#index-clabel-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-clabel-3"><span><strong class="def-name">clabel</strong> <code class="def-code-arguments">(<var class="var">c</var>)</code><a class="copiable-link" href="#index-clabel-3"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-clabel-4"><span><strong class="def-name">clabel</strong> <code class="def-code-arguments">(…, <var class="var">prop</var>, <var class="var">val</var>, …)</code><a class="copiable-link" href="#index-clabel-4"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-clabel-5"><span><code class="def-type"><var class="var">hlabels</var> =</code> <strong class="def-name">clabel</strong> <code class="def-code-arguments">(…)</code><a class="copiable-link" href="#index-clabel-5"> ¶</a></span></dt>
<dd><p>Add labels to the contours of a contour plot.
</p>
<p>The contour levels are specified by the contour matrix <var class="var">c</var> which is
returned by <code class="code">contour</code>, <code class="code">contourc</code>, <code class="code">contourf</code>, and
<code class="code">contour3</code>. Contour labels are rotated to match the local line
orientation and centered on the line. The position of labels along the
contour line is chosen randomly.
</p>
<p>If the argument <var class="var">h</var> is a handle to a contour group object, then label
this plot rather than the one in the current axes returned by <code class="code">gca</code>.
</p>
<p>By default, all contours are labeled. However, the contours to label can be
specified by the vector <var class="var">v</var>. If the <code class="code">"manual"</code> argument is
given then the contours to label can be selected with the mouse.
</p>
<p>Additional property/value pairs that are valid properties of text objects
can be given and are passed to the underlying text objects. Moreover,
the contour group property <code class="code">"LabelSpacing"</code> is available which
determines the spacing between labels on a contour to be specified. The
default is 144 points, or 2 inches.
</p>
<p>The optional return value <var class="var">hlabels</var> is a vector of graphics handles to
the text objects representing each label.
The <code class="code">"userdata"</code> property of the text objects contains the numerical
value of the contour label.
</p>
<p>The full list of text object properties is documented at
<a class="ref" href="Text-Properties.html">Text Properties</a>.
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">[c, h] = contour (peaks (), -4 : 6);
clabel (c, h, -4:2:6, "fontsize", 12);
</pre></div></div>
<p><strong class="strong">See also:</strong> <a class="ref" href="Two_002dDimensional-Plots.html#XREFcontour">contour</a>, <a class="ref" href="Two_002dDimensional-Plots.html#XREFcontourf">contourf</a>, <a class="ref" href="Two_002dDimensional-Plots.html#XREFcontour3">contour3</a>, <a class="ref" href="Three_002dDimensional-Plots.html#XREFmeshc">meshc</a>, <a class="ref" href="Three_002dDimensional-Plots.html#XREFsurfc">surfc</a>, <a class="ref" href="#XREFtext">text</a>.
</p></dd></dl>
<a class="anchor" id="XREFbox"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-box"><span><strong class="def-name">box</strong><a class="copiable-link" href="#index-box"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-box-1"><span><strong class="def-name">box</strong> <code class="def-code-arguments">on</code><a class="copiable-link" href="#index-box-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-box-2"><span><strong class="def-name">box</strong> <code class="def-code-arguments">off</code><a class="copiable-link" href="#index-box-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-box-3"><span><strong class="def-name">box</strong> <code class="def-code-arguments">(<var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-box-3"> ¶</a></span></dt>
<dd><p>Control display of the axes border.
</p>
<p>The argument may be either <code class="code">"on"</code> or <code class="code">"off"</code>. If it is
omitted, the current box state is toggled.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then operate on this
axes rather than the current axes returned by <code class="code">gca</code>.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="Axis-Configuration.html#XREFaxis">axis</a>, <a class="ref" href="#XREFgrid">grid</a>.
</p></dd></dl>
<a class="anchor" id="XREFgrid"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-grid"><span><strong class="def-name">grid</strong><a class="copiable-link" href="#index-grid"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-grid-1"><span><strong class="def-name">grid</strong> <code class="def-code-arguments">on</code><a class="copiable-link" href="#index-grid-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-grid-2"><span><strong class="def-name">grid</strong> <code class="def-code-arguments">off</code><a class="copiable-link" href="#index-grid-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-grid-3"><span><strong class="def-name">grid</strong> <code class="def-code-arguments">minor</code><a class="copiable-link" href="#index-grid-3"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-grid-4"><span><strong class="def-name">grid</strong> <code class="def-code-arguments">minor on</code><a class="copiable-link" href="#index-grid-4"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-grid-5"><span><strong class="def-name">grid</strong> <code class="def-code-arguments">minor off</code><a class="copiable-link" href="#index-grid-5"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-grid-6"><span><strong class="def-name">grid</strong> <code class="def-code-arguments">(<var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-grid-6"> ¶</a></span></dt>
<dd><p>Control the display of plot grid lines.
</p>
<p>The function state input may be either <code class="code">"on"</code> or <code class="code">"off"</code>.
If it is omitted, the current grid state is toggled.
</p>
<p>When the first argument is <code class="code">"minor"</code> all subsequent commands
modify the minor grid rather than the major grid.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then operate on
this axes rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>To control the grid lines for an individual axes use the <code class="code">set</code>
function. For example:
</p>
<div class="example">
<pre class="example-preformatted">set (gca, "ygrid", "on");
</pre></div>
<p><strong class="strong">See also:</strong> <a class="ref" href="Axis-Configuration.html#XREFaxis">axis</a>, <a class="ref" href="#XREFbox">box</a>.
</p></dd></dl>
<a class="anchor" id="XREFcolorbar"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-colorbar"><span><strong class="def-name">colorbar</strong><a class="copiable-link" href="#index-colorbar"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-colorbar-1"><span><strong class="def-name">colorbar</strong> <code class="def-code-arguments">(…, <var class="var">loc</var>)</code><a class="copiable-link" href="#index-colorbar-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-colorbar-2"><span><strong class="def-name">colorbar</strong> <code class="def-code-arguments">(<var class="var">delete_option</var>)</code><a class="copiable-link" href="#index-colorbar-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-colorbar-3"><span><strong class="def-name">colorbar</strong> <code class="def-code-arguments">(<var class="var">hcb</var>, …)</code><a class="copiable-link" href="#index-colorbar-3"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-colorbar-4"><span><strong class="def-name">colorbar</strong> <code class="def-code-arguments">(<var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-colorbar-4"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-colorbar-5"><span><strong class="def-name">colorbar</strong> <code class="def-code-arguments">(…, "peer", <var class="var">hax</var>, …)</code><a class="copiable-link" href="#index-colorbar-5"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-colorbar-6"><span><strong class="def-name">colorbar</strong> <code class="def-code-arguments">(…, "location", <var class="var">loc</var>, …)</code><a class="copiable-link" href="#index-colorbar-6"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-colorbar-7"><span><strong class="def-name">colorbar</strong> <code class="def-code-arguments">(…, <var class="var">prop</var>, <var class="var">val</var>, …)</code><a class="copiable-link" href="#index-colorbar-7"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-colorbar-8"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">colorbar</strong> <code class="def-code-arguments">(…)</code><a class="copiable-link" href="#index-colorbar-8"> ¶</a></span></dt>
<dd><p>Add a colorbar to the current axes.
</p>
<p>A colorbar displays the current colormap along with numerical rulings
so that the color scale can be interpreted.
</p>
<p>The optional input <var class="var">loc</var> determines the location of the
colorbar. If present, it must be the last argument to <code class="code">colorbar</code>.
Valid values for <var class="var">loc</var> are
</p>
<dl class="table">
<dt><code class="code">"EastOutside"</code></dt>
<dd><p>Place the colorbar outside the plot to the right. This is the default.
</p>
</dd>
<dt><code class="code">"East"</code></dt>
<dd><p>Place the colorbar inside the plot to the right.
</p>
</dd>
<dt><code class="code">"WestOutside"</code></dt>
<dd><p>Place the colorbar outside the plot to the left.
</p>
</dd>
<dt><code class="code">"West"</code></dt>
<dd><p>Place the colorbar inside the plot to the left.
</p>
</dd>
<dt><code class="code">"NorthOutside"</code></dt>
<dd><p>Place the colorbar above the plot.
</p>
</dd>
<dt><code class="code">"North"</code></dt>
<dd><p>Place the colorbar at the top of the plot.
</p>
</dd>
<dt><code class="code">"SouthOutside"</code></dt>
<dd><p>Place the colorbar under the plot.
</p>
</dd>
<dt><code class="code">"South"</code></dt>
<dd><p>Place the colorbar at the bottom of the plot.
</p></dd>
</dl>
<p>To remove a colorbar from a plot use any one of the following keywords for
the <var class="var">delete_option</var>: <code class="code">"off"</code>, <code class="code">"delete"</code>, <code class="code">"hide"</code>.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then the colorbar is
added to this axes, rather than the current axes returned by <code class="code">gca</code>.
Alternatively, If the argument <code class="code">"peer"</code> is given, then the following
argument is treated as the axes handle in which to add the colorbar. The
<code class="code">"peer"</code> calling syntax may be removed in the future and is not
recommended.
</p>
<p>If the first argument <var class="var">hcb</var> is a handle to a colorbar object, then
operate on this colorbar directly.
</p>
<p>Additional property/value pairs are passed directly to the underlying axes
object. The full list of properties is documented at
<a class="ref" href="Axes-Properties.html">Axes Properties</a>.
</p>
<p>The optional return value <var class="var">h</var> is a graphics handle to the created
colorbar object.
</p>
<p>Implementation Note: A colorbar is created as an additional axes object
with the <code class="code">"tag"</code> property set to <code class="code">"colorbar"</code>. The created
object has the extra property <code class="code">"location"</code> which controls the
positioning of the colorbar.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="Representing-Images.html#XREFcolormap">colormap</a>.
</p></dd></dl>
<a class="anchor" id="XREFannotation"></a><span style="display:block; margin-top:-4.5ex;"> </span>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-annotation"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">(<var class="var">type</var>)</code><a class="copiable-link" href="#index-annotation"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-1"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">("line", <var class="var">x</var>, <var class="var">y</var>)</code><a class="copiable-link" href="#index-annotation-1"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-2"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">("arrow", <var class="var">x</var>, <var class="var">y</var>)</code><a class="copiable-link" href="#index-annotation-2"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-3"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">("doublearrow", <var class="var">x</var>, <var class="var">y</var>)</code><a class="copiable-link" href="#index-annotation-3"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-4"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">("textarrow", <var class="var">x</var>, <var class="var">y</var>)</code><a class="copiable-link" href="#index-annotation-4"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-5"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">("textbox", <var class="var">pos</var>)</code><a class="copiable-link" href="#index-annotation-5"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-6"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">("rectangle", <var class="var">pos</var>)</code><a class="copiable-link" href="#index-annotation-6"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-7"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">("ellipse", <var class="var">pos</var>)</code><a class="copiable-link" href="#index-annotation-7"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-8"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">(…, <var class="var">prop</var>, <var class="var">val</var>)</code><a class="copiable-link" href="#index-annotation-8"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-9"><span><strong class="def-name">annotation</strong> <code class="def-code-arguments">(<var class="var">hf</var>, …)</code><a class="copiable-link" href="#index-annotation-9"> ¶</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-annotation-10"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">annotation</strong> <code class="def-code-arguments">(…)</code><a class="copiable-link" href="#index-annotation-10"> ¶</a></span></dt>
<dd><p>Draw annotations to emphasize parts of a figure.
</p>
<p>You may build a default annotation by specifying only the <var class="var">type</var>
of the annotation.
</p>
<p>Otherwise you can select the type of annotation and then set its position
using either <var class="var">x</var> and <var class="var">y</var> coordinates for line-based annotations or a
position vector <var class="var">pos</var> for others. In either case, coordinates are
interpreted using the <code class="code">"units"</code> property of the annotation object.
The default is <code class="code">"normalized"</code>, which means the lower left hand corner
of the figure has coordinates ‘<samp class="samp">[0 0]</samp>’ and the upper right hand corner
‘<samp class="samp">[1 1]</samp>’.
</p>
<p>If the first argument <var class="var">hf</var> is a figure handle, then plot into this
figure, rather than the current figure returned by <code class="code">gcf</code>.
</p>
<p>Further arguments can be provided in the form of <var class="var">prop</var>/<var class="var">val</var> pairs
to customize the annotation appearance.
</p>
<p>The optional return value <var class="var">h</var> is a graphics handle to the created
annotation object. This can be used with the <code class="code">set</code> function to
customize an existing annotation object.
</p>
<p>All annotation objects share two properties:
</p>
<ul class="itemize mark-bullet">
<li><code class="code">"units"</code>: the units in which coordinates are interpreted.<br>
Its value may be one of <code class="code">"centimeters"</code> | <code class="code">"characters"</code> |
<code class="code">"inches"</code> | <code class="code">"{normalized}"</code> | <code class="code">"pixels"</code> |
<code class="code">"points"</code>.
</li><li><code class="code">"position"</code>: a four-element vector [x0 y0 width height].<br>
The vector specifies the coordinates (x0,y0) of the origin of the annotation
object, its width, and its height. The width and height may be negative,
depending on the orientation of the object.
</li></ul>
<p>Valid annotation types and their specific properties are described
below:
</p>
<dl class="table">
<dt><code class="code">"line"</code></dt>
<dd><p>Constructs a line. <var class="var">x</var> and <var class="var">y</var> must be two-element vectors
specifying the x and y coordinates of the two ends of the line.
</p>
<p>The line can be customized using <code class="code">"linewidth"</code>, <code class="code">"linestyle"</code>,
and <code class="code">"color"</code> properties the same way as for <code class="code">line</code> objects.
</p>
</dd>
<dt><code class="code">"arrow"</code></dt>
<dd><p>Construct an arrow. The second point in vectors <var class="var">x</var> and <var class="var">y</var>
specifies the arrowhead coordinates.
</p>
<p>Besides line properties, the arrowhead can be customized using
<code class="code">"headlength"</code>, <code class="code">"headwidth"</code>, and <code class="code">"headstyle"</code>
properties. Supported values for <code class="code">"headstyle"</code> property are:
[<code class="code">"diamond"</code> | <code class="code">"ellipse"</code> | <code class="code">"plain"</code> |
<code class="code">"rectangle"</code> | <code class="code">"vback1"</code> | <code class="code">"{vback2}"</code> |
<code class="code">"vback3"</code>]
</p>
</dd>
<dt><code class="code">"doublearrow"</code></dt>
<dd><p>Construct a double arrow. Vectors <var class="var">x</var> and <var class="var">y</var> specify the
arrowhead coordinates.
</p>
<p>The line and the arrowhead can be customized as for arrow annotations, but
some property names are duplicated:
<code class="code">"head1length"</code>/<code class="code">"head2length"</code>,
<code class="code">"head1width"</code>/<code class="code">"head2width"</code>, etc. The index 1 marks the
properties of the arrowhead at the first point in <var class="var">x</var> and <var class="var">y</var>
coordinates.
</p>
</dd>
<dt><code class="code">"textarrow"</code></dt>
<dd><p>Construct an arrow with a text label at the opposite end from the arrowhead.
</p>
<p>Use the <code class="code">"string"</code> property to change the text string.
The line and the arrowhead can be customized as for arrow annotations, and
the text can be customized using the same properties as <code class="code">text</code> graphics
objects. Note, however, that some text property names are prefixed with
"text" to distinguish them from arrow properties:
<code class="code">"textbackgroundcolor"</code>, <code class="code">"textcolor"</code>,
<code class="code">"textedgecolor"</code>, <code class="code">"textlinewidth"</code>,
<code class="code">"textmargin"</code>, <code class="code">"textrotation"</code>.
</p>
</dd>
<dt><code class="code">"textbox"</code></dt>
<dd><p>Construct a box with text inside. <var class="var">pos</var> specifies the
<code class="code">"position"</code> property of the annotation.
</p>
<p>Use the <code class="code">"string"</code> property to change the text string.
You may use <code class="code">"backgroundcolor"</code>, <code class="code">"edgecolor"</code>,
<code class="code">"linestyle"</code>, and <code class="code">"linewidth"</code> properties to customize
the box background color and edge appearance. A limited set of <code class="code">text</code>
objects properties are also available; Besides <code class="code">"font…"</code>
properties, you may also use <code class="code">"horizontalalignment"</code> and
<code class="code">"verticalalignment"</code> to position the text inside the box.
</p>
<p>Finally, the <code class="code">"fitboxtotext"</code> property controls the actual extent of
the box. If <code class="code">"on"</code> (the default) the box limits are fitted to the
text extent.
</p>
</dd>
<dt><code class="code">"rectangle"</code></dt>
<dd><p>Construct a rectangle. <var class="var">pos</var> specifies the <code class="code">"position"</code> property
of the annotation.
</p>
<p>You may use <code class="code">"facecolor"</code>, <code class="code">"color"</code>, <code class="code">"linestyle"</code>, and
<code class="code">"linewidth"</code> properties to customize the rectangle background color
and edge appearance.
</p>
</dd>
<dt><code class="code">"ellipse"</code></dt>
<dd><p>Construct an ellipse. <var class="var">pos</var> specifies the <code class="code">"position"</code> property
of the annotation.
</p>
<p>See <code class="code">"rectangle"</code> annotations for customization.
</p></dd>
</dl>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFxlabel">xlabel</a>, <a class="ref" href="#XREFylabel">ylabel</a>, <a class="ref" href="#XREFzlabel">zlabel</a>, <a class="ref" href="#XREFtitle">title</a>, <a class="ref" href="#XREFtext">text</a>, <a class="ref" href="Interacting-with-Plots.html#XREFgtext">gtext</a>, <a class="ref" href="#XREFlegend">legend</a>, <a class="ref" href="#XREFcolorbar">colorbar</a>.
</p></dd></dl>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Multiple-Plots-on-One-Page.html">Multiple Plots on One Page</a>, Previous: <a href="Three_002dDimensional-Plots.html">Three-Dimensional Plots</a>, Up: <a href="High_002dLevel-Plotting.html">High-Level Plotting</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|