1*******************
2``matplotlib.axes``
3*******************
4
5.. currentmodule:: matplotlib.axes
6
7.. contents:: Table of Contents
8   :depth: 2
9   :local:
10   :backlinks: entry
11   :class: multicol-toc
12
13.. automodule:: matplotlib.axes
14   :no-members:
15   :no-undoc-members:
16
17Inheritance
18===========
19.. inheritance-diagram:: matplotlib.axes.Axes
20   :private-bases:
21
22The Axes class
23==============
24
25.. autoclass:: Axes
26   :no-members:
27   :no-undoc-members:
28   :show-inheritance:
29
30
31Subplots
32========
33
34.. autosummary::
35   :toctree: _as_gen
36   :template: autosummary.rst
37   :nosignatures:
38
39   SubplotBase
40   subplot_class_factory
41
42Plotting
43========
44
45Basic
46-----
47
48.. autosummary::
49   :toctree: _as_gen
50   :template: autosummary.rst
51   :nosignatures:
52
53   Axes.plot
54   Axes.errorbar
55   Axes.scatter
56
57   Axes.plot_date
58   Axes.step
59
60   Axes.loglog
61   Axes.semilogx
62   Axes.semilogy
63
64   Axes.fill_between
65   Axes.fill_betweenx
66
67   Axes.bar
68   Axes.barh
69   Axes.bar_label
70
71   Axes.stem
72   Axes.eventplot
73
74   Axes.pie
75
76   Axes.stackplot
77
78
79   Axes.broken_barh
80   Axes.vlines
81   Axes.hlines
82   Axes.fill
83
84Spans
85-----
86
87.. autosummary::
88   :toctree: _as_gen
89   :template: autosummary.rst
90   :nosignatures:
91
92   Axes.axhline
93   Axes.axhspan
94   Axes.axvline
95   Axes.axvspan
96   Axes.axline
97
98Spectral
99--------
100
101.. autosummary::
102   :toctree: _as_gen
103   :template: autosummary.rst
104   :nosignatures:
105
106   Axes.acorr
107   Axes.angle_spectrum
108   Axes.cohere
109   Axes.csd
110   Axes.magnitude_spectrum
111   Axes.phase_spectrum
112   Axes.psd
113   Axes.specgram
114   Axes.xcorr
115
116Statistics
117----------
118
119.. autosummary::
120   :toctree: _as_gen
121   :template: autosummary.rst
122   :nosignatures:
123
124   Axes.boxplot
125   Axes.violinplot
126
127   Axes.violin
128   Axes.bxp
129
130Binned
131------
132
133.. autosummary::
134   :toctree: _as_gen
135   :template: autosummary.rst
136   :nosignatures:
137
138   Axes.hexbin
139   Axes.hist
140   Axes.hist2d
141   Axes.stairs
142
143Contours
144--------
145
146.. autosummary::
147   :toctree: _as_gen
148   :template: autosummary.rst
149   :nosignatures:
150
151   Axes.clabel
152   Axes.contour
153   Axes.contourf
154
1552D arrays
156---------
157
158.. autosummary::
159   :toctree: _as_gen
160   :template: autosummary.rst
161   :nosignatures:
162
163   Axes.imshow
164   Axes.matshow
165   Axes.pcolor
166   Axes.pcolorfast
167   Axes.pcolormesh
168   Axes.spy
169
170Unstructured triangles
171----------------------
172
173.. autosummary::
174   :toctree: _as_gen
175   :template: autosummary.rst
176   :nosignatures:
177
178   Axes.tripcolor
179   Axes.triplot
180   Axes.tricontour
181   Axes.tricontourf
182
183
184Text and annotations
185--------------------
186
187.. autosummary::
188   :toctree: _as_gen
189   :template: autosummary.rst
190   :nosignatures:
191
192   Axes.annotate
193   Axes.text
194   Axes.table
195   Axes.arrow
196   Axes.inset_axes
197   Axes.indicate_inset
198   Axes.indicate_inset_zoom
199   Axes.secondary_xaxis
200   Axes.secondary_yaxis
201
202
203Vector fields
204-------------
205
206.. autosummary::
207   :toctree: _as_gen
208   :template: autosummary.rst
209   :nosignatures:
210
211   Axes.barbs
212   Axes.quiver
213   Axes.quiverkey
214   Axes.streamplot
215
216
217Clearing
218========
219
220.. autosummary::
221   :toctree: _as_gen
222   :template: autosummary.rst
223   :nosignatures:
224
225   Axes.cla
226   Axes.clear
227
228
229Appearance
230==========
231
232.. autosummary::
233   :toctree: _as_gen
234   :template: autosummary.rst
235   :nosignatures:
236
237
238   Axes.axis
239
240   Axes.set_axis_off
241   Axes.set_axis_on
242   Axes.set_frame_on
243   Axes.get_frame_on
244
245   Axes.set_axisbelow
246   Axes.get_axisbelow
247
248   Axes.grid
249
250   Axes.get_facecolor
251   Axes.set_facecolor
252
253
254Property cycle
255==============
256
257.. autosummary::
258   :toctree: _as_gen
259   :template: autosummary.rst
260   :nosignatures:
261
262   Axes.set_prop_cycle
263
264
265Axis / limits
266=============
267
268.. For families of methods of the form {get,set}_{x,y}foo, try to list them in
269   the order set_xfoo, get_xfoo, set_yfoo, get_yfoo
270
271.. autosummary::
272   :toctree: _as_gen
273   :template: autosummary.rst
274   :nosignatures:
275
276   Axes.get_xaxis
277   Axes.get_yaxis
278
279Axis limits and direction
280-------------------------
281
282.. autosummary::
283   :toctree: _as_gen
284   :template: autosummary.rst
285   :nosignatures:
286
287   Axes.invert_xaxis
288   Axes.xaxis_inverted
289   Axes.invert_yaxis
290   Axes.yaxis_inverted
291
292   Axes.set_xlim
293   Axes.get_xlim
294   Axes.set_ylim
295   Axes.get_ylim
296
297   Axes.update_datalim
298   Axes.update_datalim_bounds
299
300   Axes.set_xbound
301   Axes.get_xbound
302   Axes.set_ybound
303   Axes.get_ybound
304
305Axis labels, title, and legend
306------------------------------
307
308.. autosummary::
309   :toctree: _as_gen
310   :template: autosummary.rst
311   :nosignatures:
312
313   Axes.set_xlabel
314   Axes.get_xlabel
315   Axes.set_ylabel
316   Axes.get_ylabel
317
318   Axes.set_title
319   Axes.get_title
320   Axes.legend
321   Axes.get_legend
322   Axes.get_legend_handles_labels
323
324Axis scales
325-----------
326
327.. autosummary::
328   :toctree: _as_gen
329   :template: autosummary.rst
330   :nosignatures:
331
332   Axes.set_xscale
333   Axes.get_xscale
334   Axes.set_yscale
335   Axes.get_yscale
336
337Autoscaling and margins
338-----------------------
339
340.. autosummary::
341   :toctree: _as_gen
342   :template: autosummary.rst
343   :nosignatures:
344
345   Axes.use_sticky_edges
346
347   Axes.margins
348   Axes.set_xmargin
349   Axes.set_ymargin
350
351   Axes.relim
352
353   Axes.autoscale
354   Axes.autoscale_view
355
356   Axes.set_autoscale_on
357   Axes.get_autoscale_on
358
359   Axes.set_autoscalex_on
360   Axes.get_autoscalex_on
361
362   Axes.set_autoscaley_on
363   Axes.get_autoscaley_on
364
365Aspect ratio
366------------
367
368.. autosummary::
369   :toctree: _as_gen
370   :template: autosummary.rst
371   :nosignatures:
372
373   Axes.apply_aspect
374   Axes.set_aspect
375   Axes.get_aspect
376
377   Axes.set_box_aspect
378   Axes.get_box_aspect
379
380   Axes.set_adjustable
381   Axes.get_adjustable
382
383Ticks and tick labels
384---------------------
385
386.. autosummary::
387   :toctree: _as_gen
388   :template: autosummary.rst
389   :nosignatures:
390
391   Axes.set_xticks
392   Axes.get_xticks
393
394   Axes.set_xticklabels
395   Axes.get_xticklabels
396   Axes.get_xmajorticklabels
397   Axes.get_xminorticklabels
398
399   Axes.get_xgridlines
400   Axes.get_xticklines
401
402   Axes.xaxis_date
403
404   Axes.set_yticks
405   Axes.get_yticks
406
407   Axes.set_yticklabels
408   Axes.get_yticklabels
409   Axes.get_ymajorticklabels
410   Axes.get_yminorticklabels
411
412   Axes.get_ygridlines
413   Axes.get_yticklines
414
415   Axes.yaxis_date
416
417   Axes.minorticks_off
418   Axes.minorticks_on
419
420   Axes.ticklabel_format
421   Axes.tick_params
422
423   Axes.locator_params
424
425
426Units
427=====
428
429.. autosummary::
430   :toctree: _as_gen
431   :template: autosummary.rst
432   :nosignatures:
433
434   Axes.convert_xunits
435   Axes.convert_yunits
436   Axes.have_units
437
438
439Adding artists
440==============
441
442.. autosummary::
443   :toctree: _as_gen
444   :template: autosummary.rst
445   :nosignatures:
446
447   Axes.add_artist
448   Axes.add_child_axes
449   Axes.add_collection
450   Axes.add_container
451   Axes.add_image
452   Axes.add_line
453   Axes.add_patch
454   Axes.add_table
455
456
457Twinning and sharing
458====================
459
460.. autosummary::
461   :toctree: _as_gen
462   :template: autosummary.rst
463   :nosignatures:
464
465   Axes.twinx
466   Axes.twiny
467
468   Axes.sharex
469   Axes.sharey
470
471   Axes.get_shared_x_axes
472   Axes.get_shared_y_axes
473
474
475Axes position
476=============
477.. autosummary::
478   :toctree: _as_gen
479   :template: autosummary.rst
480   :nosignatures:
481
482   Axes.get_anchor
483   Axes.set_anchor
484
485   Axes.get_axes_locator
486   Axes.set_axes_locator
487
488   Axes.reset_position
489
490   Axes.get_position
491   Axes.set_position
492
493
494Async/event based
495=================
496
497.. autosummary::
498   :toctree: _as_gen
499   :template: autosummary.rst
500   :nosignatures:
501
502   Axes.stale
503   Axes.pchanged
504   Axes.add_callback
505   Axes.remove_callback
506
507
508Interactive
509===========
510
511.. autosummary::
512   :toctree: _as_gen
513   :template: autosummary.rst
514   :nosignatures:
515
516
517   Axes.can_pan
518   Axes.can_zoom
519
520   Axes.get_navigate
521   Axes.set_navigate
522   Axes.get_navigate_mode
523   Axes.set_navigate_mode
524
525   Axes.start_pan
526   Axes.drag_pan
527   Axes.end_pan
528
529   Axes.format_coord
530   Axes.format_cursor_data
531   Axes.format_xdata
532   Axes.format_ydata
533
534   Axes.mouseover
535   Axes.in_axes
536
537   Axes.contains
538   Axes.contains_point
539
540   Axes.get_cursor_data
541
542Children
543========
544
545.. autosummary::
546   :toctree: _as_gen
547   :template: autosummary.rst
548   :nosignatures:
549
550   Axes.get_children
551   Axes.get_images
552   Axes.get_lines
553   Axes.findobj
554
555
556Drawing
557=======
558
559.. autosummary::
560   :toctree: _as_gen
561   :template: autosummary.rst
562   :nosignatures:
563
564   Axes.draw
565   Axes.draw_artist
566   Axes.redraw_in_frame
567   Axes.get_renderer_cache
568
569   Axes.get_rasterization_zorder
570   Axes.set_rasterization_zorder
571
572   Axes.get_window_extent
573   Axes.get_tightbbox
574
575
576Projection
577==========
578
579Methods used by `~matplotlib.axis.Axis` that must be overridden for
580non-rectilinear Axes.
581
582.. autosummary::
583   :toctree: _as_gen
584   :template: autosummary.rst
585   :nosignatures:
586
587   Axes.name
588   Axes.get_xaxis_transform
589   Axes.get_yaxis_transform
590   Axes.get_data_ratio
591
592   Axes.get_xaxis_text1_transform
593   Axes.get_xaxis_text2_transform
594   Axes.get_yaxis_text1_transform
595   Axes.get_yaxis_text2_transform
596
597
598Other
599=====
600
601.. autosummary::
602   :toctree: _as_gen
603   :template: autosummary.rst
604   :nosignatures:
605
606   Axes.zorder
607   Axes.get_default_bbox_extra_artists
608   Axes.get_transformed_clip_path_and_affine
609   Axes.has_data
610