-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathaxes_api.html
More file actions
10666 lines (10431 loc) · 860 KB
/
axes_api.html
File metadata and controls
10666 lines (10431 loc) · 860 KB
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
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>axes — Matplotlib 1.3.1 documentation</title>
<link rel="stylesheet" href="../_static/mpl.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.3.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Matplotlib 1.3.1 documentation"
href="../_static/opensearch.xml"/>
<link rel="top" title="Matplotlib 1.3.1 documentation" href="../index.html" />
<link rel="up" title="The Matplotlib API" href="index.html" />
<link rel="next" title="axis" href="axis_api.html" />
<link rel="prev" title="artists" href="artist_api.html" />
<link rel="canonical" href="https://matplotlib.org/stable/api/axes_api.html" />
<script data-domain="matplotlib.org" defer="defer" src="https://views.scientific-python.org/js/script.js"></script>
</head>
<body>
<div id="unreleased-message"> You are reading an old version of the documentation (v1.3.1). For the latest version see <a href="https://matplotlib.org/stable/api/axes_api.html">https://matplotlib.org/stable/api/axes_api.html</a></div>
<!-- Piwik -->
<script type="text/javascript">
if ("matplotlib.sourceforge.net" == document.location.hostname ||
"matplotlib.sf.net" == document.location.hostname) {
var pkBaseURL = (("https:" == document.location.protocol) ? "https://apps.sourceforge.net/piwik/matplotlib/" : "http://apps.sourceforge.net/piwik/matplotlib/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript">
if ("matplotlib.sourceforge.net" == document.location.hostname ||
"matplotlib.sf.net" == document.location.hostname) {
piwik_action_name = '';
piwik_idsite = 1;
piwik_url = pkBaseURL + "piwik.php";
piwik_log(piwik_action_name, piwik_idsite, piwik_url);
document.write(unescape('%3Cobject%3E%3Cnoscript%3E%3Cp%3E%3Cimg src="http://apps.sourceforge.net/piwik/matplotlib/piwik.php?idsite=1" alt="piwik"/%3E%3C/p%3E%3C/noscript%3E%3C/object%3E'));
}
</script>
<!-- End Piwik Tag -->
<link rel="shortcut icon" href="_static/favicon.ico">
<!-- The "Fork me on github" ribbon -->
<img style="float: right; margin-bottom: -40px; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" usemap="#ribbonmap"/>
<map name="ribbonmap">
<area shape="poly" coords="15,0,148,-1,148,135" href="https://github.com/matplotlib/matplotlib" title="Fork me on GitHub" />
</map>
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
<a href="../index.html"><img src="../_static/logo2.png" border="0" alt="matplotlib"/></a>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="axis_api.html" title="axis"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="artist_api.html" title="artists"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">home</a>| </li>
<li><a href="../examples/index.html">examples</a>| </li>
<li><a href="../gallery.html">gallery</a>| </li>
<li><a href="pyplot_summary.html">pyplot</a>| </li>
<li><a href="../contents.html">docs</a> »</li>
<li><a href="index.html" accesskey="U">The Matplotlib API</a> »</li>
</ul>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">axes</a><ul>
<li><a class="reference internal" href="#module-matplotlib.axes"><tt class="docutils literal"><span class="pre">matplotlib.axes</span></tt></a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="artist_api.html"
title="previous chapter">artists</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="axis_api.html"
title="next chapter">axis</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/axes_api.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="axes">
<h1>axes<a class="headerlink" href="#axes" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-matplotlib.axes">
<span id="matplotlib-axes"></span><h2><a class="reference internal" href="#module-matplotlib.axes" title="matplotlib.axes"><tt class="xref py py-mod docutils literal"><span class="pre">matplotlib.axes</span></tt></a><a class="headerlink" href="#module-matplotlib.axes" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="matplotlib.axes.Axes">
<em class="property">class </em><tt class="descclassname">matplotlib.axes.</tt><tt class="descname">Axes</tt><big>(</big><em>fig</em>, <em>rect</em>, <em>axisbg=None</em>, <em>frameon=True</em>, <em>sharex=None</em>, <em>sharey=None</em>, <em>label=''</em>, <em>xscale=None</em>, <em>yscale=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.artist.Artist</span></tt></a></p>
<p>The <a class="reference internal" href="#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><tt class="xref py py-class docutils literal"><span class="pre">Axes</span></tt></a> contains most of the figure elements:
<a class="reference internal" href="axis_api.html#matplotlib.axis.Axis" title="matplotlib.axis.Axis"><tt class="xref py py-class docutils literal"><span class="pre">Axis</span></tt></a>, <a class="reference internal" href="axis_api.html#matplotlib.axis.Tick" title="matplotlib.axis.Tick"><tt class="xref py py-class docutils literal"><span class="pre">Tick</span></tt></a>,
<a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D" title="matplotlib.lines.Line2D"><tt class="xref py py-class docutils literal"><span class="pre">Line2D</span></tt></a>, <a class="reference internal" href="artist_api.html#matplotlib.text.Text" title="matplotlib.text.Text"><tt class="xref py py-class docutils literal"><span class="pre">Text</span></tt></a>,
<a class="reference internal" href="artist_api.html#matplotlib.patches.Polygon" title="matplotlib.patches.Polygon"><tt class="xref py py-class docutils literal"><span class="pre">Polygon</span></tt></a>, etc., and sets the
coordinate system.</p>
<p>The <a class="reference internal" href="#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><tt class="xref py py-class docutils literal"><span class="pre">Axes</span></tt></a> instance supports callbacks through a callbacks
attribute which is a <a class="reference internal" href="cbook_api.html#matplotlib.cbook.CallbackRegistry" title="matplotlib.cbook.CallbackRegistry"><tt class="xref py py-class docutils literal"><span class="pre">CallbackRegistry</span></tt></a>
instance. The events you can connect to are ‘xlim_changed’ and
‘ylim_changed’ and the callback will be called with func(<em>ax</em>)
where <em>ax</em> is the <a class="reference internal" href="#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><tt class="xref py py-class docutils literal"><span class="pre">Axes</span></tt></a> instance.</p>
<dl class="method">
<dt id="matplotlib.axes.Axes.acorr">
<tt class="descname">acorr</tt><big>(</big><em>x</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.acorr" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot the autocorrelation of <em>x</em>.</p>
<p>Call signature:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">acorr</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">normed</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">detrend</span><span class="o">=</span><span class="n">mlab</span><span class="o">.</span><span class="n">detrend_none</span><span class="p">,</span> <span class="n">usevlines</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
<span class="n">maxlags</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>
</div>
<p>If <em>normed</em> = <em>True</em>, normalize the data by the autocorrelation at
0-th lag. <em>x</em> is detrended by the <em>detrend</em> callable (default no
normalization).</p>
<p>Data are plotted as <tt class="docutils literal"><span class="pre">plot(lags,</span> <span class="pre">c,</span> <span class="pre">**kwargs)</span></tt></p>
<p>Return value is a tuple (<em>lags</em>, <em>c</em>, <em>line</em>) where:</p>
<blockquote>
<div><ul class="simple">
<li><em>lags</em> are a length 2*maxlags+1 lag vector</li>
<li><em>c</em> is the 2*maxlags+1 auto correlation vector</li>
<li><em>line</em> is a <a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D" title="matplotlib.lines.Line2D"><tt class="xref py py-class docutils literal"><span class="pre">Line2D</span></tt></a> instance
returned by <a class="reference internal" href="#matplotlib.axes.Axes.plot" title="matplotlib.axes.Axes.plot"><tt class="xref py py-meth docutils literal"><span class="pre">plot()</span></tt></a></li>
</ul>
</div></blockquote>
<p>The default <em>linestyle</em> is None and the default <em>marker</em> is
<tt class="docutils literal"><span class="pre">'o'</span></tt>, though these can be overridden with keyword args.
The cross correlation is performed with
<tt class="xref py py-func docutils literal"><span class="pre">numpy.correlate()</span></tt> with <em>mode</em> = 2.</p>
<p>If <em>usevlines</em> is <em>True</em>, <a class="reference internal" href="#matplotlib.axes.Axes.vlines" title="matplotlib.axes.Axes.vlines"><tt class="xref py py-meth docutils literal"><span class="pre">vlines()</span></tt></a>
rather than <a class="reference internal" href="#matplotlib.axes.Axes.plot" title="matplotlib.axes.Axes.plot"><tt class="xref py py-meth docutils literal"><span class="pre">plot()</span></tt></a> is used to draw
vertical lines from the origin to the acorr. Otherwise, the
plot style is determined by the kwargs, which are
<a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D" title="matplotlib.lines.Line2D"><tt class="xref py py-class docutils literal"><span class="pre">Line2D</span></tt></a> properties.</p>
<p><em>maxlags</em> is a positive integer detailing the number of lags
to show. The default value of <em>None</em> will return all
<tt class="docutils literal"><span class="pre">(2*len(x)-1)</span></tt> lags.</p>
<p>The return value is a tuple (<em>lags</em>, <em>c</em>, <em>linecol</em>, <em>b</em>)
where</p>
<blockquote>
<div><ul class="simple">
<li><em>linecol</em> is the
<a class="reference internal" href="collections_api.html#matplotlib.collections.LineCollection" title="matplotlib.collections.LineCollection"><tt class="xref py py-class docutils literal"><span class="pre">LineCollection</span></tt></a></li>
<li><em>b</em> is the <em>x</em>-axis.</li>
</ul>
</div></blockquote>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#matplotlib.axes.Axes.plot" title="matplotlib.axes.Axes.plot"><tt class="xref py py-meth docutils literal"><span class="pre">plot()</span></tt></a> or
<a class="reference internal" href="#matplotlib.axes.Axes.vlines" title="matplotlib.axes.Axes.vlines"><tt class="xref py py-meth docutils literal"><span class="pre">vlines()</span></tt></a>
For documentation on valid kwargs.</p>
</div>
<p><strong>Example:</strong></p>
<p><a class="reference internal" href="pyplot_api.html#matplotlib.pyplot.xcorr" title="matplotlib.pyplot.xcorr"><tt class="xref py py-func docutils literal"><span class="pre">xcorr()</span></tt></a> is top graph, and
<a class="reference internal" href="pyplot_api.html#matplotlib.pyplot.acorr" title="matplotlib.pyplot.acorr"><tt class="xref py py-func docutils literal"><span class="pre">acorr()</span></tt></a> is bottom graph.</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/xcorr_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/xcorr_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/xcorr_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/xcorr_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/xcorr_demo.png" src="../_images/xcorr_demo.png" />
</div>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.add_artist">
<tt class="descname">add_artist</tt><big>(</big><em>a</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.add_artist" title="Permalink to this definition">¶</a></dt>
<dd><p>Add any <a class="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><tt class="xref py py-class docutils literal"><span class="pre">Artist</span></tt></a> to the axes.</p>
<p>Returns the artist.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.add_collection">
<tt class="descname">add_collection</tt><big>(</big><em>collection</em>, <em>autolim=True</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.add_collection" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a <a class="reference internal" href="collections_api.html#matplotlib.collections.Collection" title="matplotlib.collections.Collection"><tt class="xref py py-class docutils literal"><span class="pre">Collection</span></tt></a> instance
to the axes.</p>
<p>Returns the collection.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.add_container">
<tt class="descname">add_container</tt><big>(</big><em>container</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.add_container" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a <tt class="xref py py-class docutils literal"><span class="pre">Container</span></tt> instance
to the axes.</p>
<p>Returns the collection.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.add_line">
<tt class="descname">add_line</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.add_line" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a <a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D" title="matplotlib.lines.Line2D"><tt class="xref py py-class docutils literal"><span class="pre">Line2D</span></tt></a> to the list of plot
lines</p>
<p>Returns the line.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.add_patch">
<tt class="descname">add_patch</tt><big>(</big><em>p</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.add_patch" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a <a class="reference internal" href="artist_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><tt class="xref py py-class docutils literal"><span class="pre">Patch</span></tt></a> <em>p</em> to the list of
axes patches; the clipbox will be set to the Axes clipping
box. If the transform is not set, it will be set to
<tt class="xref py py-attr docutils literal"><span class="pre">transData</span></tt>.</p>
<p>Returns the patch.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.add_table">
<tt class="descname">add_table</tt><big>(</big><em>tab</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.add_table" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a <tt class="xref py py-class docutils literal"><span class="pre">Table</span></tt> instance to the
list of axes tables</p>
<p>Returns the table.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.annotate">
<tt class="descname">annotate</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.annotate" title="Permalink to this definition">¶</a></dt>
<dd><p>Create an annotation: a piece of text referring to a data
point.</p>
<p>Call signature:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">annotate</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">xy</span><span class="p">,</span> <span class="n">xytext</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">xycoords</span><span class="o">=</span><span class="s">'data'</span><span class="p">,</span>
<span class="n">textcoords</span><span class="o">=</span><span class="s">'data'</span><span class="p">,</span> <span class="n">arrowprops</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>
</div>
<p>Keyword arguments:</p>
<p>Annotate the <em>x</em>, <em>y</em> point <em>xy</em> with text <em>s</em> at <em>x</em>, <em>y</em>
location <em>xytext</em>. (If <em>xytext</em> = <em>None</em>, defaults to <em>xy</em>,
and if <em>textcoords</em> = <em>None</em>, defaults to <em>xycoords</em>).</p>
<p><em>arrowprops</em>, if not <em>None</em>, is a dictionary of line properties
(see <a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D" title="matplotlib.lines.Line2D"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.lines.Line2D</span></tt></a>) for the arrow that connects
annotation to the point.</p>
<p>If the dictionary has a key <em>arrowstyle</em>, a FancyArrowPatch
instance is created with the given dictionary and is
drawn. Otherwise, a YAArow patch instance is created and
drawn. Valid keys for YAArow are</p>
<table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="87%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Key</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>width</td>
<td>the width of the arrow in points</td>
</tr>
<tr class="row-odd"><td>frac</td>
<td>the fraction of the arrow length occupied by the head</td>
</tr>
<tr class="row-even"><td>headwidth</td>
<td>the width of the base of the arrow head in points</td>
</tr>
<tr class="row-odd"><td>shrink</td>
<td>oftentimes it is convenient to have the arrowtip
and base a bit away from the text and point being
annotated. If <em>d</em> is the distance between the text and
annotated point, shrink will shorten the arrow so the tip
and base are shink percent of the distance <em>d</em> away from
the endpoints. ie, <tt class="docutils literal"><span class="pre">shrink=0.05</span> <span class="pre">is</span> <span class="pre">5%</span></tt></td>
</tr>
<tr class="row-even"><td>?</td>
<td>any key for <tt class="xref py py-class docutils literal"><span class="pre">matplotlib.patches.polygon</span></tt></td>
</tr>
</tbody>
</table>
<p>Valid keys for FancyArrowPatch are</p>
<table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Key</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>arrowstyle</td>
<td>the arrow style</td>
</tr>
<tr class="row-odd"><td>connectionstyle</td>
<td>the connection style</td>
</tr>
<tr class="row-even"><td>relpos</td>
<td>default is (0.5, 0.5)</td>
</tr>
<tr class="row-odd"><td>patchA</td>
<td>default is bounding box of the text</td>
</tr>
<tr class="row-even"><td>patchB</td>
<td>default is None</td>
</tr>
<tr class="row-odd"><td>shrinkA</td>
<td>default is 2 points</td>
</tr>
<tr class="row-even"><td>shrinkB</td>
<td>default is 2 points</td>
</tr>
<tr class="row-odd"><td>mutation_scale</td>
<td>default is text size (in points)</td>
</tr>
<tr class="row-even"><td>mutation_aspect</td>
<td>default is 1.</td>
</tr>
<tr class="row-odd"><td>?</td>
<td>any key for <a class="reference internal" href="artist_api.html#matplotlib.patches.PathPatch" title="matplotlib.patches.PathPatch"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.patches.PathPatch</span></tt></a></td>
</tr>
</tbody>
</table>
<p><em>xycoords</em> and <em>textcoords</em> are strings that indicate the
coordinates of <em>xy</em> and <em>xytext</em>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="75%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>‘figure points’</td>
<td>points from the lower left corner of the figure</td>
</tr>
<tr class="row-odd"><td>‘figure pixels’</td>
<td>pixels from the lower left corner of the figure</td>
</tr>
<tr class="row-even"><td>‘figure fraction’</td>
<td>0,0 is lower left of figure and 1,1 is upper right</td>
</tr>
<tr class="row-odd"><td>‘axes points’</td>
<td>points from lower left corner of axes</td>
</tr>
<tr class="row-even"><td>‘axes pixels’</td>
<td>pixels from lower left corner of axes</td>
</tr>
<tr class="row-odd"><td>‘axes fraction’</td>
<td>0,0 is lower left of axes and 1,1 is upper right</td>
</tr>
<tr class="row-even"><td>‘data’</td>
<td>use the coordinate system of the object being
annotated (default)</td>
</tr>
<tr class="row-odd"><td>‘offset points’</td>
<td>Specify an offset (in points) from the <em>xy</em> value</td>
</tr>
<tr class="row-even"><td>‘polar’</td>
<td>you can specify <em>theta</em>, <em>r</em> for the annotation,
even in cartesian plots. Note that if you
are using a polar axes, you do not need
to specify polar for the coordinate
system since that is the native “data” coordinate
system.</td>
</tr>
</tbody>
</table>
<p>If a ‘points’ or ‘pixels’ option is specified, values will be
added to the bottom-left and if negative, values will be
subtracted from the top-right. e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># 10 points to the right of the left border of the axes and</span>
<span class="c"># 5 points below the top border</span>
<span class="n">xy</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="o">-</span><span class="mi">5</span><span class="p">),</span> <span class="n">xycoords</span><span class="o">=</span><span class="s">'axes points'</span>
</pre></div>
</div>
<p>You may use an instance of
<a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><tt class="xref py py-class docutils literal"><span class="pre">Transform</span></tt></a> or
<a class="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><tt class="xref py py-class docutils literal"><span class="pre">Artist</span></tt></a>. See
<a class="reference internal" href="../users/annotations_guide.html#plotting-guide-annotation"><em>Annotating Axes</em></a> for more details.</p>
<p>The <em>annotation_clip</em> attribute contols the visibility of the
annotation when it goes outside the axes area. If True, the
annotation will only be drawn when the <em>xy</em> is inside the
axes. If False, the annotation will always be drawn regardless
of its position. The default is <em>None</em>, which behave as True
only if <em>xycoords</em> is”data”.</p>
<p>Additional kwargs are Text properties:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="75%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_agg_filter" title="matplotlib.artist.Artist.set_agg_filter"><tt class="xref py py-meth docutils literal"><span class="pre">agg_filter</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_alpha" title="matplotlib.artist.Artist.set_alpha"><tt class="xref py py-meth docutils literal"><span class="pre">alpha</span></tt></a></td>
<td>float (0.0 transparent through 1.0 opaque)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_animated" title="matplotlib.artist.Artist.set_animated"><tt class="xref py py-meth docutils literal"><span class="pre">animated</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_axes" title="matplotlib.artist.Artist.set_axes"><tt class="xref py py-meth docutils literal"><span class="pre">axes</span></tt></a></td>
<td>an <a class="reference internal" href="#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><tt class="xref py py-class docutils literal"><span class="pre">Axes</span></tt></a> instance</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_backgroundcolor" title="matplotlib.text.Text.set_backgroundcolor"><tt class="xref py py-meth docutils literal"><span class="pre">backgroundcolor</span></tt></a></td>
<td>any matplotlib color</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_bbox" title="matplotlib.text.Text.set_bbox"><tt class="xref py py-meth docutils literal"><span class="pre">bbox</span></tt></a></td>
<td>rectangle prop dict</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_box" title="matplotlib.artist.Artist.set_clip_box"><tt class="xref py py-meth docutils literal"><span class="pre">clip_box</span></tt></a></td>
<td>a <a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.transforms.Bbox</span></tt></a> instance</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_on" title="matplotlib.artist.Artist.set_clip_on"><tt class="xref py py-meth docutils literal"><span class="pre">clip_on</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_path" title="matplotlib.artist.Artist.set_clip_path"><tt class="xref py py-meth docutils literal"><span class="pre">clip_path</span></tt></a></td>
<td>[ (<a class="reference internal" href="path_api.html#matplotlib.path.Path" title="matplotlib.path.Path"><tt class="xref py py-class docutils literal"><span class="pre">Path</span></tt></a>, <a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><tt class="xref py py-class docutils literal"><span class="pre">Transform</span></tt></a>) | <a class="reference internal" href="artist_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><tt class="xref py py-class docutils literal"><span class="pre">Patch</span></tt></a> | None ]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_color" title="matplotlib.text.Text.set_color"><tt class="xref py py-meth docutils literal"><span class="pre">color</span></tt></a></td>
<td>any matplotlib color</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_contains" title="matplotlib.artist.Artist.set_contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains</span></tt></a></td>
<td>a callable function</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_family" title="matplotlib.text.Text.set_family"><tt class="xref py py-meth docutils literal"><span class="pre">family</span></tt></a> or fontfamily or fontname or name</td>
<td>[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_figure" title="matplotlib.artist.Artist.set_figure"><tt class="xref py py-meth docutils literal"><span class="pre">figure</span></tt></a></td>
<td>a <a class="reference internal" href="figure_api.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.figure.Figure</span></tt></a> instance</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_fontproperties" title="matplotlib.text.Text.set_fontproperties"><tt class="xref py py-meth docutils literal"><span class="pre">fontproperties</span></tt></a> or font_properties</td>
<td>a <a class="reference internal" href="font_manager_api.html#matplotlib.font_manager.FontProperties" title="matplotlib.font_manager.FontProperties"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.font_manager.FontProperties</span></tt></a> instance</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_gid" title="matplotlib.artist.Artist.set_gid"><tt class="xref py py-meth docutils literal"><span class="pre">gid</span></tt></a></td>
<td>an id string</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_horizontalalignment" title="matplotlib.text.Text.set_horizontalalignment"><tt class="xref py py-meth docutils literal"><span class="pre">horizontalalignment</span></tt></a> or ha</td>
<td>[ ‘center’ | ‘right’ | ‘left’ ]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_label" title="matplotlib.artist.Artist.set_label"><tt class="xref py py-meth docutils literal"><span class="pre">label</span></tt></a></td>
<td>string or anything printable with ‘%s’ conversion.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_linespacing" title="matplotlib.text.Text.set_linespacing"><tt class="xref py py-meth docutils literal"><span class="pre">linespacing</span></tt></a></td>
<td>float (multiple of font size)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_lod" title="matplotlib.artist.Artist.set_lod"><tt class="xref py py-meth docutils literal"><span class="pre">lod</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_multialignment" title="matplotlib.text.Text.set_multialignment"><tt class="xref py py-meth docutils literal"><span class="pre">multialignment</span></tt></a></td>
<td>[‘left’ | ‘right’ | ‘center’ ]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_path_effects" title="matplotlib.artist.Artist.set_path_effects"><tt class="xref py py-meth docutils literal"><span class="pre">path_effects</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_picker" title="matplotlib.artist.Artist.set_picker"><tt class="xref py py-meth docutils literal"><span class="pre">picker</span></tt></a></td>
<td>[None|float|boolean|callable]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_position" title="matplotlib.text.Text.set_position"><tt class="xref py py-meth docutils literal"><span class="pre">position</span></tt></a></td>
<td>(x,y)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_rasterized" title="matplotlib.artist.Artist.set_rasterized"><tt class="xref py py-meth docutils literal"><span class="pre">rasterized</span></tt></a></td>
<td>[True | False | None]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_rotation" title="matplotlib.text.Text.set_rotation"><tt class="xref py py-meth docutils literal"><span class="pre">rotation</span></tt></a></td>
<td>[ angle in degrees | ‘vertical’ | ‘horizontal’ ]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_rotation_mode" title="matplotlib.text.Text.set_rotation_mode"><tt class="xref py py-meth docutils literal"><span class="pre">rotation_mode</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_size" title="matplotlib.text.Text.set_size"><tt class="xref py py-meth docutils literal"><span class="pre">size</span></tt></a> or fontsize</td>
<td>[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_sketch_params" title="matplotlib.artist.Artist.set_sketch_params"><tt class="xref py py-meth docutils literal"><span class="pre">sketch_params</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_snap" title="matplotlib.artist.Artist.set_snap"><tt class="xref py py-meth docutils literal"><span class="pre">snap</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_stretch" title="matplotlib.text.Text.set_stretch"><tt class="xref py py-meth docutils literal"><span class="pre">stretch</span></tt></a> or fontstretch</td>
<td>[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_style" title="matplotlib.text.Text.set_style"><tt class="xref py py-meth docutils literal"><span class="pre">style</span></tt></a> or fontstyle</td>
<td>[ ‘normal’ | ‘italic’ | ‘oblique’]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_text" title="matplotlib.text.Text.set_text"><tt class="xref py py-meth docutils literal"><span class="pre">text</span></tt></a></td>
<td>string or anything printable with ‘%s’ conversion.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_transform" title="matplotlib.artist.Artist.set_transform"><tt class="xref py py-meth docutils literal"><span class="pre">transform</span></tt></a></td>
<td><a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><tt class="xref py py-class docutils literal"><span class="pre">Transform</span></tt></a> instance</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_url" title="matplotlib.artist.Artist.set_url"><tt class="xref py py-meth docutils literal"><span class="pre">url</span></tt></a></td>
<td>a url string</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_variant" title="matplotlib.text.Text.set_variant"><tt class="xref py py-meth docutils literal"><span class="pre">variant</span></tt></a> or fontvariant</td>
<td>[ ‘normal’ | ‘small-caps’ ]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_verticalalignment" title="matplotlib.text.Text.set_verticalalignment"><tt class="xref py py-meth docutils literal"><span class="pre">verticalalignment</span></tt></a> or va or ma</td>
<td>[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_visible" title="matplotlib.artist.Artist.set_visible"><tt class="xref py py-meth docutils literal"><span class="pre">visible</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_weight" title="matplotlib.text.Text.set_weight"><tt class="xref py py-meth docutils literal"><span class="pre">weight</span></tt></a> or fontweight</td>
<td>[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_x" title="matplotlib.text.Text.set_x"><tt class="xref py py-meth docutils literal"><span class="pre">x</span></tt></a></td>
<td>float</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.text.Text.set_y" title="matplotlib.text.Text.set_y"><tt class="xref py py-meth docutils literal"><span class="pre">y</span></tt></a></td>
<td>float</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_zorder" title="matplotlib.artist.Artist.set_zorder"><tt class="xref py py-meth docutils literal"><span class="pre">zorder</span></tt></a></td>
<td>any number</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/annotation_demo2.py">Source code</a>)</p>
<div class="figure">
<img alt="../_images/annotation_demo2_00.png" src="../_images/annotation_demo2_00.png" />
<p class="caption">(<a class="reference external" href="../mpl_examples/pylab_examples/annotation_demo2_00.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/annotation_demo2_00.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/annotation_demo2_00.pdf">pdf</a>)</p>
</div>
<div class="figure">
<img alt="../_images/annotation_demo2_01.png" src="../_images/annotation_demo2_01.png" />
<p class="caption">(<a class="reference external" href="../mpl_examples/pylab_examples/annotation_demo2_01.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/annotation_demo2_01.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/annotation_demo2_01.pdf">pdf</a>)</p>
</div>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.apply_aspect">
<tt class="descname">apply_aspect</tt><big>(</big><em>position=None</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.apply_aspect" title="Permalink to this definition">¶</a></dt>
<dd><p>Use <tt class="xref py py-meth docutils literal"><span class="pre">_aspect()</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">_adjustable()</span></tt> to modify the
axes box or the view limits.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.arrow">
<tt class="descname">arrow</tt><big>(</big><em>x</em>, <em>y</em>, <em>dx</em>, <em>dy</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.arrow" title="Permalink to this definition">¶</a></dt>
<dd><p>Add an arrow to the axes.</p>
<p>Call signature:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">arrow</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">dx</span><span class="p">,</span> <span class="n">dy</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>
</div>
<p>Draws arrow on specified axis from (<em>x</em>, <em>y</em>) to (<em>x</em> + <em>dx</em>,
<em>y</em> + <em>dy</em>). Uses FancyArrow patch to construct the arrow.</p>
<p>The resulting arrow is affected by the axes aspect ratio and limits.
This may produce an arrow whose head is not square with its stem. To
create an arrow whose head is square with its stem, use
<a class="reference internal" href="#matplotlib.axes.Axes.annotate" title="matplotlib.axes.Axes.annotate"><tt class="xref py py-meth docutils literal"><span class="pre">annotate()</span></tt></a>.</p>
<p>Optional kwargs control the arrow construction and properties:</p>
<dl class="docutils">
<dt>Constructor arguments</dt>
<dd><dl class="first last docutils">
<dt><em>width</em>: float (default: 0.001)</dt>
<dd>width of full arrow tail</dd>
<dt><em>length_includes_head</em>: [True | False] (default: False)</dt>
<dd>True if head is to be counted in calculating the length.</dd>
<dt><em>head_width</em>: float or None (default: 3*width)</dt>
<dd>total width of the full arrow head</dd>
<dt><em>head_length</em>: float or None (default: 1.5 * head_width)</dt>
<dd>length of arrow head</dd>
<dt><em>shape</em>: [‘full’, ‘left’, ‘right’] (default: ‘full’)</dt>
<dd>draw the left-half, right-half, or full arrow</dd>
<dt><em>overhang</em>: float (default: 0)</dt>
<dd>fraction that the arrow is swept back (0 overhang means
triangular shape). Can be negative or greater than one.</dd>
<dt><em>head_starts_at_zero</em>: [True | False] (default: False)</dt>
<dd>if True, the head starts being drawn at coordinate 0
instead of ending at coordinate 0.</dd>
</dl>
</dd>
</dl>
<p>Other valid kwargs (inherited from <tt class="xref py py-class docutils literal"><span class="pre">Patch</span></tt>) are:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="31%" />
<col width="69%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_agg_filter" title="matplotlib.artist.Artist.set_agg_filter"><tt class="xref py py-meth docutils literal"><span class="pre">agg_filter</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_alpha" title="matplotlib.patches.Patch.set_alpha"><tt class="xref py py-meth docutils literal"><span class="pre">alpha</span></tt></a></td>
<td>float or None</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_animated" title="matplotlib.artist.Artist.set_animated"><tt class="xref py py-meth docutils literal"><span class="pre">animated</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_antialiased" title="matplotlib.patches.Patch.set_antialiased"><tt class="xref py py-meth docutils literal"><span class="pre">antialiased</span></tt></a> or aa</td>
<td>[True | False] or None for default</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_axes" title="matplotlib.artist.Artist.set_axes"><tt class="xref py py-meth docutils literal"><span class="pre">axes</span></tt></a></td>
<td>an <a class="reference internal" href="#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><tt class="xref py py-class docutils literal"><span class="pre">Axes</span></tt></a> instance</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_box" title="matplotlib.artist.Artist.set_clip_box"><tt class="xref py py-meth docutils literal"><span class="pre">clip_box</span></tt></a></td>
<td>a <a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.transforms.Bbox</span></tt></a> instance</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_on" title="matplotlib.artist.Artist.set_clip_on"><tt class="xref py py-meth docutils literal"><span class="pre">clip_on</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_path" title="matplotlib.artist.Artist.set_clip_path"><tt class="xref py py-meth docutils literal"><span class="pre">clip_path</span></tt></a></td>
<td>[ (<a class="reference internal" href="path_api.html#matplotlib.path.Path" title="matplotlib.path.Path"><tt class="xref py py-class docutils literal"><span class="pre">Path</span></tt></a>, <a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><tt class="xref py py-class docutils literal"><span class="pre">Transform</span></tt></a>) | <a class="reference internal" href="artist_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><tt class="xref py py-class docutils literal"><span class="pre">Patch</span></tt></a> | None ]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_color" title="matplotlib.patches.Patch.set_color"><tt class="xref py py-meth docutils literal"><span class="pre">color</span></tt></a></td>
<td>matplotlib color spec</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_contains" title="matplotlib.artist.Artist.set_contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains</span></tt></a></td>
<td>a callable function</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_edgecolor" title="matplotlib.patches.Patch.set_edgecolor"><tt class="xref py py-meth docutils literal"><span class="pre">edgecolor</span></tt></a> or ec</td>
<td>mpl color spec, or None for default, or ‘none’ for no color</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_facecolor" title="matplotlib.patches.Patch.set_facecolor"><tt class="xref py py-meth docutils literal"><span class="pre">facecolor</span></tt></a> or fc</td>
<td>mpl color spec, or None for default, or ‘none’ for no color</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_figure" title="matplotlib.artist.Artist.set_figure"><tt class="xref py py-meth docutils literal"><span class="pre">figure</span></tt></a></td>
<td>a <a class="reference internal" href="figure_api.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.figure.Figure</span></tt></a> instance</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_fill" title="matplotlib.patches.Patch.set_fill"><tt class="xref py py-meth docutils literal"><span class="pre">fill</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_gid" title="matplotlib.artist.Artist.set_gid"><tt class="xref py py-meth docutils literal"><span class="pre">gid</span></tt></a></td>
<td>an id string</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_hatch" title="matplotlib.patches.Patch.set_hatch"><tt class="xref py py-meth docutils literal"><span class="pre">hatch</span></tt></a></td>
<td>[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_label" title="matplotlib.artist.Artist.set_label"><tt class="xref py py-meth docutils literal"><span class="pre">label</span></tt></a></td>
<td>string or anything printable with ‘%s’ conversion.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_linestyle" title="matplotlib.patches.Patch.set_linestyle"><tt class="xref py py-meth docutils literal"><span class="pre">linestyle</span></tt></a> or ls</td>
<td>[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_linewidth" title="matplotlib.patches.Patch.set_linewidth"><tt class="xref py py-meth docutils literal"><span class="pre">linewidth</span></tt></a> or lw</td>
<td>float or None for default</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_lod" title="matplotlib.artist.Artist.set_lod"><tt class="xref py py-meth docutils literal"><span class="pre">lod</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_path_effects" title="matplotlib.artist.Artist.set_path_effects"><tt class="xref py py-meth docutils literal"><span class="pre">path_effects</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_picker" title="matplotlib.artist.Artist.set_picker"><tt class="xref py py-meth docutils literal"><span class="pre">picker</span></tt></a></td>
<td>[None|float|boolean|callable]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_rasterized" title="matplotlib.artist.Artist.set_rasterized"><tt class="xref py py-meth docutils literal"><span class="pre">rasterized</span></tt></a></td>
<td>[True | False | None]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_sketch_params" title="matplotlib.artist.Artist.set_sketch_params"><tt class="xref py py-meth docutils literal"><span class="pre">sketch_params</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_snap" title="matplotlib.artist.Artist.set_snap"><tt class="xref py py-meth docutils literal"><span class="pre">snap</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_transform" title="matplotlib.artist.Artist.set_transform"><tt class="xref py py-meth docutils literal"><span class="pre">transform</span></tt></a></td>
<td><a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><tt class="xref py py-class docutils literal"><span class="pre">Transform</span></tt></a> instance</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_url" title="matplotlib.artist.Artist.set_url"><tt class="xref py py-meth docutils literal"><span class="pre">url</span></tt></a></td>
<td>a url string</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_visible" title="matplotlib.artist.Artist.set_visible"><tt class="xref py py-meth docutils literal"><span class="pre">visible</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_zorder" title="matplotlib.artist.Artist.set_zorder"><tt class="xref py py-meth docutils literal"><span class="pre">zorder</span></tt></a></td>
<td>any number</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p><strong>Example:</strong></p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/arrow_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/arrow_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/arrow_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/arrow_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/arrow_demo.png" src="../_images/arrow_demo.png" />
</div>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.autoscale">
<tt class="descname">autoscale</tt><big>(</big><em>enable=True</em>, <em>axis='both'</em>, <em>tight=None</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.autoscale" title="Permalink to this definition">¶</a></dt>
<dd><p>Autoscale the axis view to the data (toggle).</p>
<p>Convenience method for simple axis view autoscaling.
It turns autoscaling on or off, and then,
if autoscaling for either axis is on, it performs
the autoscaling on the specified axis or axes.</p>
<dl class="docutils">
<dt><em>enable</em>: [True | False | None]</dt>
<dd>True (default) turns autoscaling on, False turns it off.
None leaves the autoscaling state unchanged.</dd>
<dt><em>axis</em>: [‘x’ | ‘y’ | ‘both’]</dt>
<dd>which axis to operate on; default is ‘both’</dd>
<dt><em>tight</em>: [True | False | None]</dt>
<dd>If True, set view limits to data limits;
if False, let the locator and margins expand the view limits;
if None, use tight scaling if the only artist is an image,
otherwise treat <em>tight</em> as False.
The <em>tight</em> setting is retained for future autoscaling
until it is explicitly changed.</dd>
</dl>
<p>Returns None.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.autoscale_view">
<tt class="descname">autoscale_view</tt><big>(</big><em>tight=None</em>, <em>scalex=True</em>, <em>scaley=True</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.autoscale_view" title="Permalink to this definition">¶</a></dt>
<dd><p>Autoscale the view limits using the data limits. You can
selectively autoscale only a single axis, eg, the xaxis by
setting <em>scaley</em> to <em>False</em>. The autoscaling preserves any
axis direction reversal that has already been done.</p>
<p>The data limits are not updated automatically when artist data are
changed after the artist has been added to an Axes instance. In that
case, use <a class="reference internal" href="#matplotlib.axes.Axes.relim" title="matplotlib.axes.Axes.relim"><tt class="xref py py-meth docutils literal"><span class="pre">matplotlib.axes.Axes.relim()</span></tt></a> prior to calling
autoscale_view.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.axhline">
<tt class="descname">axhline</tt><big>(</big><em>y=0</em>, <em>xmin=0</em>, <em>xmax=1</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.axhline" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a horizontal line across the axis.</p>
<p>Call signature:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">axhline</span><span class="p">(</span><span class="n">y</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">xmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">xmax</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>
</div>
<p>Draw a horizontal line at <em>y</em> from <em>xmin</em> to <em>xmax</em>. With the
default values of <em>xmin</em> = 0 and <em>xmax</em> = 1, this line will
always span the horizontal extent of the axes, regardless of
the xlim settings, even if you change them, e.g., with the
<a class="reference internal" href="#matplotlib.axes.Axes.set_xlim" title="matplotlib.axes.Axes.set_xlim"><tt class="xref py py-meth docutils literal"><span class="pre">set_xlim()</span></tt></a> command. That is, the horizontal extent is
in axes coords: 0=left, 0.5=middle, 1.0=right but the <em>y</em>
location is in data coordinates.</p>
<p>Return value is the <a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D" title="matplotlib.lines.Line2D"><tt class="xref py py-class docutils literal"><span class="pre">Line2D</span></tt></a>
instance. kwargs are the same as kwargs to plot, and can be
used to control the line properties. e.g.,</p>
<ul>
<li><p class="first">draw a thick red hline at <em>y</em> = 0 that spans the xrange:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">axhline</span><span class="p">(</span><span class="n">linewidth</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s">'r'</span><span class="p">)</span>
</pre></div>
</div>
</li>
<li><p class="first">draw a default hline at <em>y</em> = 1 that spans the xrange:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">axhline</span><span class="p">(</span><span class="n">y</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
</pre></div>
</div>
</li>
<li><p class="first">draw a default hline at <em>y</em> = .5 that spans the the middle half of
the xrange:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">axhline</span><span class="p">(</span><span class="n">y</span><span class="o">=.</span><span class="mi">5</span><span class="p">,</span> <span class="n">xmin</span><span class="o">=</span><span class="mf">0.25</span><span class="p">,</span> <span class="n">xmax</span><span class="o">=</span><span class="mf">0.75</span><span class="p">)</span>
</pre></div>
</div>
</li>
</ul>
<p>Valid kwargs are <a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D" title="matplotlib.lines.Line2D"><tt class="xref py py-class docutils literal"><span class="pre">Line2D</span></tt></a> properties,
with the exception of ‘transform’:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="32%" />
<col width="68%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_agg_filter" title="matplotlib.artist.Artist.set_agg_filter"><tt class="xref py py-meth docutils literal"><span class="pre">agg_filter</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_alpha" title="matplotlib.artist.Artist.set_alpha"><tt class="xref py py-meth docutils literal"><span class="pre">alpha</span></tt></a></td>
<td>float (0.0 transparent through 1.0 opaque)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_animated" title="matplotlib.artist.Artist.set_animated"><tt class="xref py py-meth docutils literal"><span class="pre">animated</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_antialiased" title="matplotlib.lines.Line2D.set_antialiased"><tt class="xref py py-meth docutils literal"><span class="pre">antialiased</span></tt></a> or aa</td>
<td>[True | False]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_axes" title="matplotlib.lines.Line2D.set_axes"><tt class="xref py py-meth docutils literal"><span class="pre">axes</span></tt></a></td>
<td>an <a class="reference internal" href="#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><tt class="xref py py-class docutils literal"><span class="pre">Axes</span></tt></a> instance</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_box" title="matplotlib.artist.Artist.set_clip_box"><tt class="xref py py-meth docutils literal"><span class="pre">clip_box</span></tt></a></td>
<td>a <a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.transforms.Bbox</span></tt></a> instance</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_on" title="matplotlib.artist.Artist.set_clip_on"><tt class="xref py py-meth docutils literal"><span class="pre">clip_on</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_path" title="matplotlib.artist.Artist.set_clip_path"><tt class="xref py py-meth docutils literal"><span class="pre">clip_path</span></tt></a></td>
<td>[ (<a class="reference internal" href="path_api.html#matplotlib.path.Path" title="matplotlib.path.Path"><tt class="xref py py-class docutils literal"><span class="pre">Path</span></tt></a>, <a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><tt class="xref py py-class docutils literal"><span class="pre">Transform</span></tt></a>) | <a class="reference internal" href="artist_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><tt class="xref py py-class docutils literal"><span class="pre">Patch</span></tt></a> | None ]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_color" title="matplotlib.lines.Line2D.set_color"><tt class="xref py py-meth docutils literal"><span class="pre">color</span></tt></a> or c</td>
<td>any matplotlib color</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_contains" title="matplotlib.artist.Artist.set_contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains</span></tt></a></td>
<td>a callable function</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_dash_capstyle" title="matplotlib.lines.Line2D.set_dash_capstyle"><tt class="xref py py-meth docutils literal"><span class="pre">dash_capstyle</span></tt></a></td>
<td>[‘butt’ | ‘round’ | ‘projecting’]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_dash_joinstyle" title="matplotlib.lines.Line2D.set_dash_joinstyle"><tt class="xref py py-meth docutils literal"><span class="pre">dash_joinstyle</span></tt></a></td>
<td>[‘miter’ | ‘round’ | ‘bevel’]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_dashes" title="matplotlib.lines.Line2D.set_dashes"><tt class="xref py py-meth docutils literal"><span class="pre">dashes</span></tt></a></td>
<td>sequence of on/off ink in points</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_drawstyle" title="matplotlib.lines.Line2D.set_drawstyle"><tt class="xref py py-meth docutils literal"><span class="pre">drawstyle</span></tt></a></td>
<td>[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_figure" title="matplotlib.artist.Artist.set_figure"><tt class="xref py py-meth docutils literal"><span class="pre">figure</span></tt></a></td>
<td>a <a class="reference internal" href="figure_api.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.figure.Figure</span></tt></a> instance</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_fillstyle" title="matplotlib.lines.Line2D.set_fillstyle"><tt class="xref py py-meth docutils literal"><span class="pre">fillstyle</span></tt></a></td>
<td>[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_gid" title="matplotlib.artist.Artist.set_gid"><tt class="xref py py-meth docutils literal"><span class="pre">gid</span></tt></a></td>
<td>an id string</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_label" title="matplotlib.artist.Artist.set_label"><tt class="xref py py-meth docutils literal"><span class="pre">label</span></tt></a></td>
<td>string or anything printable with ‘%s’ conversion.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_linestyle" title="matplotlib.lines.Line2D.set_linestyle"><tt class="xref py py-meth docutils literal"><span class="pre">linestyle</span></tt></a> or ls</td>
<td>[<tt class="docutils literal"><span class="pre">'-'</span></tt> | <tt class="docutils literal"><span class="pre">'--'</span></tt> | <tt class="docutils literal"><span class="pre">'-.'</span></tt> | <tt class="docutils literal"><span class="pre">':'</span></tt> | <tt class="docutils literal"><span class="pre">'None'</span></tt> | <tt class="docutils literal"><span class="pre">'</span> <span class="pre">'</span></tt> | <tt class="docutils literal"><span class="pre">''</span></tt>] and any drawstyle in combination with a linestyle, e.g., <tt class="docutils literal"><span class="pre">'steps--'</span></tt>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_linewidth" title="matplotlib.lines.Line2D.set_linewidth"><tt class="xref py py-meth docutils literal"><span class="pre">linewidth</span></tt></a> or lw</td>
<td>float value in points</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_lod" title="matplotlib.artist.Artist.set_lod"><tt class="xref py py-meth docutils literal"><span class="pre">lod</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_marker" title="matplotlib.lines.Line2D.set_marker"><tt class="xref py py-meth docutils literal"><span class="pre">marker</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_markeredgecolor" title="matplotlib.lines.Line2D.set_markeredgecolor"><tt class="xref py py-meth docutils literal"><span class="pre">markeredgecolor</span></tt></a> or mec</td>
<td>any matplotlib color</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_markeredgewidth" title="matplotlib.lines.Line2D.set_markeredgewidth"><tt class="xref py py-meth docutils literal"><span class="pre">markeredgewidth</span></tt></a> or mew</td>
<td>float value in points</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_markerfacecolor" title="matplotlib.lines.Line2D.set_markerfacecolor"><tt class="xref py py-meth docutils literal"><span class="pre">markerfacecolor</span></tt></a> or mfc</td>
<td>any matplotlib color</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_markerfacecoloralt" title="matplotlib.lines.Line2D.set_markerfacecoloralt"><tt class="xref py py-meth docutils literal"><span class="pre">markerfacecoloralt</span></tt></a> or mfcalt</td>
<td>any matplotlib color</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_markersize" title="matplotlib.lines.Line2D.set_markersize"><tt class="xref py py-meth docutils literal"><span class="pre">markersize</span></tt></a> or ms</td>
<td>float</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_markevery" title="matplotlib.lines.Line2D.set_markevery"><tt class="xref py py-meth docutils literal"><span class="pre">markevery</span></tt></a></td>
<td>None | integer | (startind, stride)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_path_effects" title="matplotlib.artist.Artist.set_path_effects"><tt class="xref py py-meth docutils literal"><span class="pre">path_effects</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_picker" title="matplotlib.lines.Line2D.set_picker"><tt class="xref py py-meth docutils literal"><span class="pre">picker</span></tt></a></td>
<td>float distance in points or callable pick function <tt class="docutils literal"><span class="pre">fn(artist,</span> <span class="pre">event)</span></tt></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_pickradius" title="matplotlib.lines.Line2D.set_pickradius"><tt class="xref py py-meth docutils literal"><span class="pre">pickradius</span></tt></a></td>
<td>float distance in points</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_rasterized" title="matplotlib.artist.Artist.set_rasterized"><tt class="xref py py-meth docutils literal"><span class="pre">rasterized</span></tt></a></td>
<td>[True | False | None]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_sketch_params" title="matplotlib.artist.Artist.set_sketch_params"><tt class="xref py py-meth docutils literal"><span class="pre">sketch_params</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_snap" title="matplotlib.artist.Artist.set_snap"><tt class="xref py py-meth docutils literal"><span class="pre">snap</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_solid_capstyle" title="matplotlib.lines.Line2D.set_solid_capstyle"><tt class="xref py py-meth docutils literal"><span class="pre">solid_capstyle</span></tt></a></td>
<td>[‘butt’ | ‘round’ | ‘projecting’]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_solid_joinstyle" title="matplotlib.lines.Line2D.set_solid_joinstyle"><tt class="xref py py-meth docutils literal"><span class="pre">solid_joinstyle</span></tt></a></td>
<td>[‘miter’ | ‘round’ | ‘bevel’]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_transform" title="matplotlib.lines.Line2D.set_transform"><tt class="xref py py-meth docutils literal"><span class="pre">transform</span></tt></a></td>
<td>a <a class="reference internal" href="../devel/transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.transforms.Transform</span></tt></a> instance</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_url" title="matplotlib.artist.Artist.set_url"><tt class="xref py py-meth docutils literal"><span class="pre">url</span></tt></a></td>
<td>a url string</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_visible" title="matplotlib.artist.Artist.set_visible"><tt class="xref py py-meth docutils literal"><span class="pre">visible</span></tt></a></td>
<td>[True | False]</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_xdata" title="matplotlib.lines.Line2D.set_xdata"><tt class="xref py py-meth docutils literal"><span class="pre">xdata</span></tt></a></td>
<td>1D array</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.lines.Line2D.set_ydata" title="matplotlib.lines.Line2D.set_ydata"><tt class="xref py py-meth docutils literal"><span class="pre">ydata</span></tt></a></td>
<td>1D array</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_zorder" title="matplotlib.artist.Artist.set_zorder"><tt class="xref py py-meth docutils literal"><span class="pre">zorder</span></tt></a></td>
<td>any number</td>
</tr>
</tbody>
</table>
</div></blockquote>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#matplotlib.axes.Axes.axhspan" title="matplotlib.axes.Axes.axhspan"><tt class="xref py py-meth docutils literal"><span class="pre">axhspan()</span></tt></a></dt>
<dd>for example plot and source code</dd>
</dl>
</div>
</dd></dl>
<dl class="method">
<dt id="matplotlib.axes.Axes.axhspan">
<tt class="descname">axhspan</tt><big>(</big><em>ymin</em>, <em>ymax</em>, <em>xmin=0</em>, <em>xmax=1</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#matplotlib.axes.Axes.axhspan" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a horizontal span (rectangle) across the axis.</p>
<p>Call signature:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">axhspan</span><span class="p">(</span><span class="n">ymin</span><span class="p">,</span> <span class="n">ymax</span><span class="p">,</span> <span class="n">xmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">xmax</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>
</div>
<p><em>y</em> coords are in data units and <em>x</em> coords are in axes (relative
0-1) units.</p>
<p>Draw a horizontal span (rectangle) from <em>ymin</em> to <em>ymax</em>.
With the default values of <em>xmin</em> = 0 and <em>xmax</em> = 1, this
always spans the xrange, regardless of the xlim settings, even
if you change them, e.g., with the <a class="reference internal" href="#matplotlib.axes.Axes.set_xlim" title="matplotlib.axes.Axes.set_xlim"><tt class="xref py py-meth docutils literal"><span class="pre">set_xlim()</span></tt></a> command.
That is, the horizontal extent is in axes coords: 0=left,
0.5=middle, 1.0=right but the <em>y</em> location is in data
coordinates.</p>
<p>Return value is a <a class="reference internal" href="artist_api.html#matplotlib.patches.Polygon" title="matplotlib.patches.Polygon"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.patches.Polygon</span></tt></a>
instance.</p>
<p>Examples:</p>
<ul>
<li><p class="first">draw a gray rectangle from <em>y</em> = 0.25-0.75 that spans the
horizontal extent of the axes:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">axhspan</span><span class="p">(</span><span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.75</span><span class="p">,</span> <span class="n">facecolor</span><span class="o">=</span><span class="s">'0.5'</span><span class="p">,</span> <span class="n">alpha</span><span class="o">=</span><span class="mf">0.5</span><span class="p">)</span>
</pre></div>
</div>
</li>
</ul>
<p>Valid kwargs are <a class="reference internal" href="artist_api.html#matplotlib.patches.Polygon" title="matplotlib.patches.Polygon"><tt class="xref py py-class docutils literal"><span class="pre">Polygon</span></tt></a> properties:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="31%" />
<col width="69%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_agg_filter" title="matplotlib.artist.Artist.set_agg_filter"><tt class="xref py py-meth docutils literal"><span class="pre">agg_filter</span></tt></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="artist_api.html#matplotlib.patches.Patch.set_alpha" title="matplotlib.patches.Patch.set_alpha"><tt class="xref py py-meth docutils literal"><span class="pre">alpha</span></tt></a></td>