rL iH.1UdZddlmZddlmZmZddlmZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlmZmZmZddlmZddlZddlZddlmZdd lmZmZdd lmZdd lmZdd lmZdd lmZddlmZddlmZddlm Z m!Z!m"Z"ddl#m$Z$m%Z%m&Z&ddl'm(Z(m)Z)ddlm*Z*m+Z+m,Z,ddl-m.Z.ddl/m0Z0ddl/m1Z1ddl2m3Z3m4Z4ddl5m6Z6ddl7m8Z8m9Z9m:Z:ddlm;Z;ddlm?Z?ddl@mAZAmBZBddlCZDerddlEmFZFmGZGmHZHmIZIddlJZJddlKZKddlLZLddlmMZMmNZNmOZOmPZPdd lQmRZRddlSZTdd!lUmVZVddl/Zddl-ZddlZdd"lWmXZXdd#lYmZZZdd$lm[Z[dd%l>m\Z\dd&l]m^Z^m_Z_dd'l`maZambZbmcZcmdZdmeZemfZfmgZgdd(lhmiZidd)ljmkZkmlZlmmZmdd*l#mnZndd+lompZpdd,lqmrZrdd-lmsZsmtZtdd.lumvZvmwZwmxZxdd/lymzZzm{Z{m|Z|dd0lZe d8d?Z d6 d9d@ZgdAZdBZedCgdDZejhad:dEZd:dFZd:dGZejrjtZeejvd:dHZee.jx d; ddNZd:dOZdPZdQZÐd:dRZĐd?dSZŐd@dTZƐd@dUZǐdAdVZeejdBdWZeej dC dDdXZeejd:dYZeejjdZZeejjd[Zeejjd\Z dE dFd_Z dGdddIe$d`da dHdbZdcZҐdIddZӐdJdeZԐdKdfZՐdLdgZ֐dMdhZee jdNdiZee jdOdjZېd6dPdkZܐd:dlZݐd:dmZee$jd:dnZߐdQdoZe$jjrOe$jjjdpdqjdrdsjdtdue_ej d6 dRdvZd6dSdwZdTdxZd:dyZejdUdzZe dVd{d{d{d{d{d{d{d| dWd}Ze dVd{d{d{d{d{d{d~ dXdZe dVd{d{d{d{d{d{d{d| dYdZ dZd`d`dIddddd| dYdZed{d{d{d{d{d{d{d{d d[dZed{d{d{d{d{d{d{d{d d\dZed{d{d{d{d{d{d{d{d d]dZd`d`ddddddd d^dZ d_ d`dZd6dadZd6dadZd6dbdZd6dcdZdddZdddZ dCd`d dedZ dCd`d dedZ df dgdZ dG dhdZejddIdidZdidZee$j dG djdZdCdkdZdCdldZdmdZeejj d6 dndZeejj dodZd6dpdZdqdZedrejZednej Ze4j e3j Zeeeddhz vr1ejrejde*jee$j drdd dsdZ ee$j d6 dtdZee$jdUdZee$j dudZee$j$ddddZee0j@ d ddZ ee0jB d6dId ddZ!ee0jD d6dd ddZ"ee0jFdddZ#ee0jH d ddZ$ee0jJ dddd dd„Z%ee0jLddddÄZ&ee0jN dddd ddĄZ'ee0jP d6ddddǜ ddȄZ(ee0jR ddd ddʄZ)ee0jTdd dd˄Z*ee0jVd6dd̄Z+ee0jXdd^de;jZe;j\ddddf dd ddτZ,ee0j^ddddЄZ/ee0j`ddddфZ0ee0jb ddd dd҄Z1ee0jd d6d`dd`ddӜ ddԄZ2ee0jf ddd ddՄZ3ee0jh ddd ddքZ4ee0jjddddׄZ5ee0jl ddd dd؄Z6ee0jn ddd ddلZ7ee0jp d ddڄZ8ee0jrdd]dddddddddddeDjtdd`dfdd dd݄Z9ee0jv ddd ddބZ;ee0jx d6ddd`ddߜ ddZ<ee0jz ddd ddZ=ee0j| ddd ddZ>ee0j~ dCddddddddddIddddd ddZ?ee0jdQdZee0j d ddZ@ee0jdqdZAee0j dwdd ddZBee0jdddId ddZCee0jd:dZDee0jd:dZEee0jddddddddd ddZFee0jdddddddd`dd ddZGee0j d~dd ddZHee0j ddIddd ddZIee0jdIdIdd ddZJee0j ddd ddZKee0j ddd ddZLee0jddddZMee0j ddZNee0j dddd`dd ddZOee0jdqdZPee0jdqdZQee0j ddd ddZRee0j d ddZSee0jdddddddZTee0jdddddddd dÐdZUee0jddd  dĐd ZVee0j dddd ZWee0j dƐd ZXee0j d6 dtd Z ee0jdǐdȐdZYee0jddddddd dɐdZZee0jdZ[ee0jdZ\ee0jdddddddddZ]ee0jdZ^ee0j ddd dːdZ_ee0j ddd d̐dZ`ee0jdIe;jZdIdfdd d͐dZaee0jdΐdZcee0j dGdd dϐdZeee0j dCdd dАdZgee0j dCdd dѐd Ziee0jdҐd!Zkee0jdҐd"Zmd:d#Znd:d$Zod:d%Zpd:d&Zqd:d'Zrd:d(Zsd:d)Ztd:d*Zud:d+Zvd:d,Zwd:d-Zxd:d.Zyd:d/Zzd:d0Z{d:d1Z|d:d2Z}d:d3Z~d:d4Zd:d5Zy(a `matplotlib.pyplot` is a state-based interface to matplotlib. It provides an implicit, MATLAB-like, way of plotting. It also opens figures on your screen, and acts as the figure GUI manager. pyplot is mainly intended for interactive plots and simple cases of programmatic plot generation:: import numpy as np import matplotlib.pyplot as plt x = np.arange(0, 5, 0.1) y = np.sin(x) plt.plot(x, y) plt.show() The explicit object-oriented API is recommended for complex plots, though pyplot is still usually used to create the figure and often the Axes in the figure. See `.pyplot.figure`, `.pyplot.subplots`, and `.pyplot.subplot_mosaic` to create figures, and :doc:`Axes API ` for the plotting methods on an Axes:: import numpy as np import matplotlib.pyplot as plt x = np.arange(0, 5, 0.1) y = np.sin(x) fig, ax = plt.subplots() ax.plot(x, y) plt.show() See :ref:`api_interfaces` for an explanation of the tradeoffs between the implicit and explicit interfaces. ) annotations)AbstractContextManager ExitStack)EnumN) TYPE_CHECKINGcastoverload)cycler)_api) get_backendrcParams)cm)style)_pylab_helpers) interactive)cbook) _docstring)FigureCanvasBaseFigureManagerBase MouseButton)Figure FigureBase figaspect)GridSpec SubplotSpec)rcsetuprcParamsDefault rcParamsOrig)Artist)Axes)Subplot) BackendFilterbackend_registry) PolarAxes)_ColorizerInterfaceColorizingArtist Colorizer)mlab)get_scale_names) _colormaps)_color_sequencesColormap)CallableHashableIterableSequence)AnyBinaryIOLiteralTypeVar) ParamSpec) ArrayLike)Tick) _AxesBase)Event)ScalarMappable) ContourSetQuadContourSet) CollectionFillBetweenPolyCollectionLineCollectionPolyCollectionPathCollectionEventCollectionQuadMesh)Colorbar) BarContainerErrorbarContainer StemContainer) SubFigure)Legend) GaussianKDE) AxesImage FigureImage) FancyArrow StepPatchWedge)BarbsQuiver QuiverKey) ScaleBase) ColorType CoordsType HashableList LineStyleType MarkerType) SubplotTool_P_R_T) Normalize)Line2DAxLine)Text Annotation)ArrowCircle Rectangle)Polygon)ButtonSliderWidget) TickHelper FormatterFixedFormatter NullFormatter FuncFormatterFormatStrFormatterScalarFormatter LogFormatterLogFormatterExponentLogFormatterMathtextLocator IndexLocator FixedLocator NullLocator LinearLocator LogLocator AutoLocatorMultipleLocator MaxNLocatorcyNmethodfuncs W/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/matplotlib/pyplot.py_copy_docstring_and_deprecatorsrs69cyr~rrs rrrs>Arc|$tdtjt|St j |g}t |drUtjjj|}|r|j||j}t |drU|dddD] }||} t|||S)N.Callable[[Callable[_P, _R]], Callable[_P, _R]] __wrapped__)r functoolspartialrrcopyhasattrr deprecation DECORATORSgetappendr_add_pyplot_note)rr decoratorspotential_decorator decorators rrrs |D%%&EvNP P HJ &- ("..99==fE    1 2## &- (  "% T6" Kr)zFigureBase._gciz_AxesBase._scizArtist.findobjc|jsy|j}|tvryd}d|vrd}|jd|}n|j drd|z}np|j dr d|d dz}nV|j d rd|z}n?|j d r d |d dz}n%|j drd|z}nt d||rd|d}nd|d}t j|j}d|vr|jdd\}}nI|jdx} dk7r |d| || d}}n(|jdx} dk7r |d| || d}}n|dz}d}|d|d||_y)aM Add a note to the docstring of *func* that it is a pyplot wrapper. The note is added to the "Notes" section of the docstring. If that does not exist, a "Notes" section is created. In numpydoc, the "Notes" section is the third last possible section, only potentially followed by "References" and "Examples". NT.FzAxes.z.axes.z _AxesBase.z .axes.Axes zFigure.z FigureBase.z.Figure zFigureCanvasBase.z&Wrapped method from unexpected class: z:This is the :ref:`pyplot wrapper ` for `z`.zThis is equivalent to `z Notes -----riz References ----------rz Examples -------- z Notes ----- .. note:: ) __doc__ __qualname___NO_PYPLOT_NOTE __module__ startswith RuntimeErrorinspectcleandocsplitfind) r wrapped_funcqualnamewrapped_func_is_methodlinkmessagedocbeforeafterindexs rrrs <<((H?"! (!&))*!H:6   W %("   \ *hqrl*   Y 'X~   ] +8BC=(   0 1X~CH:NOONtfTVW+D64   4<< (C3 "2A6 8867 7%B >FU S[8823 3% :FU S[tX@ E7SDLr_ReplDisplayHook)NONEPLAINIPYTHONcBtjr tyyr~) matplotlibis_interactivedraw_allrrr_draw_all_if_interactivers  " #rcttjurytjj d}|stj ay|j}|stj ay|jjdttja|jdddkr ddl m }|j t}n tj t\}}|r|j#|yy)a\ Connect to the display hook of the current shell. The display hook gets called when the read-evaluate-print-loop (REPL) of the shell has finished the execution of a command. We use this callback to be able to automatically update a figure in interactive mode. This works both with IPython and with vanilla python shells. NIPython post_execute)r) backend2gui)_REPL_DISPLAYHOOKrrsysmodulesrr get_ipythoneventsregisterr version_infoIPython.core.pylabtoolsrr r#resolve_backend enable_gui) mod_ipythonipripython_gui_name_s rinstall_repl_displayhookrs,444 ++//),K ,22  "B ,22II~'?@(00#g- 8&??;=9.>>{}M  &'rcttjur-ddlm}|}|j j dttjay)z6Disconnect from the display hook of the current shell.r)rrN) rrrrrr unregisterrr)rrs runinstall_repl_displayhookrEs>,444' ] ^-EF(--rc,tj|i|Sr~)r set_loglevelargskwargss rrrSs  " "D 3F 33rTc@| t}|j||S)N) include_self)gcffindobj)omatchrs rrrXs#  y E 99U9 66rz.type[matplotlib.backend_bases._Backend] | None _backend_modctttjdt t t jjtS)z Ensure that a backend is selected and return it. This is currently private, but may be made public in the future. backend) rswitch_backendr _getrtyper backend_bases_Backendrrr_get_backend_modrfs;  x}}Y/0 Z--667 FFrc|ddl|tjurltj}|rt j |x}r|g}ng}|gdz }|D]} t||td<ytddtd<ytjd}t j|jj}|9tj}|r#|r!||k7rtdj|||t!dd}t!dd}Gfd d j"j$} |,fd t&d fd }dfd } | _|| _| | _t!dd} t/j0| dd} t/j0t2dd} || 3| | k7r.| st5d|dt7d| j8}|| _t<j?d|| j@|dvr+ddl!m"}ddl#m$} |jKd}||dkrd}|xtd<tNd<| a(dD]1}t/jRt!| |tU|_+3|jX_-t]y#t$rYNwxYw#|jL$rYwxYw)a Set the pyplot backend. Switching to an interactive backend is possible only if no event loop for another interactive backend has started. Switching to and from non-interactive backends is always possible. If the new backend is different than the current backend then all open Figures will be closed via ``plt.close('all')``. Parameters ---------- newbackend : str The case-insensitive name of the backend to use. rN)macosxqtagggtk4agggtk3aggtkaggwxaggraggzdCannot load backend {!r} which requires the {!r} interactive framework, as {!r} is currently runningnew_figure_managershowcHeZdZej eWy)#switch_backend..backend_modN)__name__rrlocalsupdatevars)modulesr backend_modrsV %rrc(j||Sr~) new_manager)numfigure canvas_classs rnew_figure_manager_given_figurez7switch_backend..new_figure_manager_given_figures++FC8 8r) FigureClassc&||i|}||Sr~r)rrrrfigrs rrz*switch_backend..new_figure_managerst.v.C23< .draw_if_interactivesB(z((*(,,779NN,,.+r manager_class pyplot_showzBackend zH defines neither FigureCanvas.manager_class nor a toplevel show functionr1zLoaded backend %s version %s.)ipymplwidget)_parse_to_version_infor )rrzmodule://ipympl.backend_nbagg)rrrreturnNone)/matplotlib.backendsr_auto_backend_sentinelr"_get_running_interactive_frameworkr#backend_for_gui_frameworkrr ImportErrorr rload_backend_module FigureCanvasrequired_interactive_frameworkformatgetattrrrrrrrrgetattr_staticr ValueErrorrr r_logdebugbackend_versionimportlib.metadatametadatarr versionPackageNotFoundErrorrr signatureglobals __signature__backendsrr) newbackendcurrent_frameworkr candidates candidate old_backendrequired_frameworkrrrrrmanager_pyplot_showbase_pyplot_show _pyplot_showimr module_version func_namerrrrs @@@@rrrts&W333!DDF ,FF%'''!JJG G $ I y)+4 Y'  5 !&+L # -- *K  1 1* =F&&L%DD%!DDF "4%);;::@& 24E;GH H!)=tD 664 (D &j..77&! 98> = / , 3  &  ' L/4@M "00 tT--.?PTU #/'+;;":,'+,- -E=1== ' JJ.;668)) (5 ZZ1N%n5 A< 8BAHY/)4LJ- -4->-> K +.- )*- #-J_  B&&   s$ JJ) J&%J&)J;:J;cd}ttttj}|j rpt tdr6tjtjjk7r-d}n*tjtjurd}|rtjdyy)NF get_native_idTzFStarting a Matplotlib GUI outside of the main thread will likely fail.)rrrrrrr threadingr5 main_thread native_idcurrent_threadr warn_external)warnrs r_warn_if_gui_out_of_main_threadr< s D-.0@0B0O0OPL22 9o . &&(I,A,A,C,M,MM'')1F1F1HH     rcJttj|i|S)z%Create a new figure manager instance.)r<rrrs rrr$s$#% 0   0 0$ A& AArc6tj|i|S)z Redraw the current figure if in interactive mode. .. warning:: End users will typically not have to call this function because the the interactive mode takes care of this. )rrrs rrr+s  2   1 14 B6 BBrcJttj|i|S)a Display all open figures. Parameters ---------- block : bool, optional Whether to wait for all figures to be closed before returning. If `True` block and run the GUI main loop until all figure windows are closed. If `False` ensure that all figure windows are displayed and return immediately. In this case, you are responsible for ensuring that the event loop is running to have responsive figures. Defaults to True in non-interactive mode and to False in interactive mode (see `.pyplot.isinteractive`). See Also -------- ion : Enable interactive mode, which shows / updates the figure after every plotting command, so that calling ``show()`` is not necessary. ioff : Disable interactive mode. savefig : Save the figure to an image file instead of showing it on screen. Notes ----- **Saving figures to file and showing a window at the same time** If you want an image file as well as a user interface window, use `.pyplot.savefig` before `.pyplot.show`. At the end of (a blocking) ``show()`` the figure is closed and thus unregistered from pyplot. Calling `.pyplot.savefig` afterwards would save a new and thus empty figure. This limitation of command order does not apply if the show is non-blocking or if you keep a reference to the figure and use `.Figure.savefig`. **Auto-show in jupyter notebooks** The jupyter backends (activated via ``%matplotlib inline``, ``%matplotlib notebook``, or ``%matplotlib widget``), call ``show()`` at the end of every cell by default. Thus, you usually don't have to call it explicitly there. )r<rrrs rrr8s'X$% "   " "D 3F 33rc*tjS)a% Return whether plots are updated after every plotting command. The interactive mode is mainly useful if you build plots from the command line and want to see the effect of each command while you are building the figure. In interactive mode: - newly created figures will be shown immediately; - figures will automatically redraw on change; - `.pyplot.show` will not block by default. In non-interactive mode: - newly created figures and changes to figures will not be reflected until explicitly asked to be; - `.pyplot.show` will block by default. See Also -------- ion : Enable interactive mode. ioff : Disable interactive mode. show : Show all figures (and maybe block). pause : Show all figures, and block for a time. )rrrrr isinteractiverAhs6  $ $ &&rct}|jtrtntt j dt|S)a Disable interactive mode. See `.pyplot.isinteractive` for more details. See Also -------- ion : Enable interactive mode. isinteractive : Whether interactive mode is enabled. show : Show all figures (and maybe block). pause : Show all figures, and block for a time. Notes ----- For a temporary change, this can be used as a context manager:: # if interactive mode is on # then figures will be shown on creation plt.ion() # This figure will be shown immediately fig = plt.figure() with plt.ioff(): # interactive mode will be off # figures will not automatically be shown fig2 = plt.figure() # ... To enable optional usage as a context manager, this function returns a context manager object, which is not intended to be stored or accessed by the user. F)rcallbackrAionioffrrrstacks rrErEs7B KE NN-/3t45! Lrct}|jtrtntt j dt|S)a Enable interactive mode. See `.pyplot.isinteractive` for more details. See Also -------- ioff : Disable interactive mode. isinteractive : Whether interactive mode is enabled. show : Show all figures (and maybe block). pause : Show all figures, and block for a time. Notes ----- For a temporary change, this can be used as a context manager:: # if interactive mode is off # then figures will not be shown on creation plt.ioff() # This figure will not be shown immediately fig = plt.figure() with plt.ion(): # interactive mode will be on # figures will automatically be shown fig2 = plt.figure() # ... To enable optional usage as a context manager, this function returns a context manager object, which is not intended to be stored or accessed by the user. T)rrCrArDrErrrrFs rrDrDs7B KE NN-/3t44  Lrctjj}|P|j}|jj r|j td|j|ytj|y)a Run the GUI event loop for *interval* seconds. If there is an active figure, it will be updated and displayed before the pause, and the GUI event loop (if any) will run during the pause. This can be used for crude animation. For more complex animation use :mod:`matplotlib.animation`. If there is no active figure, sleep for *interval* seconds instead. See Also -------- matplotlib.animation : Proper animations show : Show all figures and optional block until all figures are closed. NF)block) rrrrrstalerrstart_event_looptimesleep)intervalrrs rpauserPsb"  ++-G ==       5) 8rc 0tj|fi|yr~)rrc)grouprs rrRrRsMM%"6"rc.tj||Sr~)r rc_context)rRfnames rrUrUs  U ++rcjtjtjr tyyr~)r rcdefaultsrrrrrrXrXs$  " #rcHtjj|g|i|Sr~)rartistgetpobjrrs rr[r[#    ! !# 7 7 77rcHtjj|g|i|Sr~)rrZrr\s rrrs#     6t 6v 66rcHtjj|g|i|Sr~)rrZsetpr\s rrarar^rdrc*tdr tdt}|jtjtj ddlm}tjgdd|||f|jdd gd d d d dddddddd|S)a" Turn on `xkcd `_ sketch-style drawing mode. This will only have an effect on things drawn after this function is called. For best results, install the `xkcd script `_ font; xkcd fonts are not packaged with Matplotlib. Parameters ---------- scale : float, optional The amplitude of the wiggle perpendicular to the source line. length : float, optional The length of the wiggle along the line. randomness : float, optional The scale factor by which the length is shrunken or expanded. Notes ----- This function works by a number of rcParams, so it will probably override others you have set before. If you want the effects of this function to be temporary, it can be used as a context manager, for example:: with plt.xkcd(): # This figure will be in XKCD-style fig1 = plt.figure() # ... # This figure will be in regular style fig2 = plt.figure() z text.usetexz3xkcd mode is not compatible with text.usetex = Truer) patheffects)xkcdz xkcd Scriptz Comic Neuez Comic Sans MSg,@r w) linewidth foregroundg?g@whitegFblackr)z font.familyz font.sizez path.sketchz path.effectszaxes.linewidthzlines.linewidthzfigure.facecolorzgrid.linewidthz axes.gridzaxes.unicode_minuszaxes.edgecolorzxtick.major.sizezxtick.major.widthzytick.major.sizezytick.major.width) r rrrC _update_rawrrrdr withStroke)scalelength randomnessrGrds rrere sN  AC C KE NN8''9& OOMvz2  " "Q3 " ?A##!!& LrF) facecolor edgecolorframeonrclearc Pt} t|tr|jd} | jj t dtd||||fDs|r|rY| jj j| vr7tjd| jj jdtjj| jj | S| rt| dznd} d} || }ntd ||||fDs|r|r|| vrtjd|dt|trD|} t!} | | vr| d k(rtjd | }n"| j#| }| |}n t%|}tjj'|}|%t(d }t+| |cxk(rdk\r!nntjd |dt,t/|f||||||d|}|jj0}| r|j3| t(dD]U}|j5d\}}t7j8|}|j5dD]}t;||}||Wtjj=|t?t@tBjDur tF|_$|r$|jj0jK|jj0S)aV Create a new figure, or activate an existing figure. Parameters ---------- num : int or str or `.Figure` or `.SubFigure`, optional A unique identifier for the figure. If a figure with that identifier already exists, this figure is made active and returned. An integer refers to the ``Figure.number`` attribute, a string refers to the figure label. If there is no figure with the identifier or *num* is not given, a new figure is created, made active and returned. If *num* is an int, it will be used for the ``Figure.number`` attribute, otherwise, an auto-generated integer value is used (starting at 1 and incremented for each new figure). If *num* is a string, the figure label and the window title is set to this value. If num is a ``SubFigure``, its parent ``Figure`` is activated. figsize : (float, float), default: :rc:`figure.figsize` Width, height in inches. dpi : float, default: :rc:`figure.dpi` The resolution of the figure in dots-per-inch. facecolor : :mpltype:`color`, default: :rc:`figure.facecolor` The background color. edgecolor : :mpltype:`color`, default: :rc:`figure.edgecolor` The border color. frameon : bool, default: True If False, suppress drawing the figure frame. FigureClass : subclass of `~matplotlib.figure.Figure` If set, an instance of this subclass will be created, rather than a plain `.Figure`. clear : bool, default: False If True and the figure already exists, then it is cleared. layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}, default: None The layout mechanism for positioning of plot elements to avoid overlapping Axes decorations (labels, ticks, etc). Note that layout managers can measurably slow down figure display. - 'constrained': The constrained layout solver adjusts Axes sizes to avoid overlapping Axes decorations. Can handle complex plot layouts and colorbars, and is thus recommended. See :ref:`constrainedlayout_guide` for examples. - 'compressed': uses the same algorithm as 'constrained', but removes extra space between fixed-aspect-ratio Axes. Best for simple grids of Axes. - 'tight': Use the tight layout mechanism. This is a relatively simple algorithm that adjusts the subplot parameters so that decorations do not overlap. See `.Figure.set_tight_layout` for further details. - 'none': Do not use a layout engine. - A `.LayoutEngine` instance. Builtin layout classes are `.ConstrainedLayoutEngine` and `.TightLayoutEngine`, more easily accessible by 'constrained' and 'tight'. Passing an instance allows third parties to provide their own layout engine. If not given, fall back to using the parameters *tight_layout* and *constrained_layout*, including their config defaults :rc:`figure.autolayout` and :rc:`figure.constrained_layout.use`. **kwargs Additional keyword arguments are passed to the `.Figure` constructor. Returns ------- `~matplotlib.figure.Figure` Notes ----- A newly created figure is passed to the `~.FigureCanvasBase.new_manager` method or the `new_figure_manager` function provided by the current backend, which install a canvas and a manager on the figure. Once this is done, :rc:`figure.hooks` are called, one at a time, on the figure; these hooks allow arbitrary customization of the figure (e.g., attaching callbacks) or of associated elements (e.g., modifying the toolbar). See :doc:`/gallery/user_interfaces/mplcvd` for an example of toolbar customization. If you are creating many figures, make sure you explicitly call `.pyplot.close` on the figures you are not using, because this will enable pyplot to properly clean up the memory. `~matplotlib.rcParams` defines the default values, which can be modified in the matplotlibrc file. Trootz*The passed figure is not managed by pyplotc3$K|]}|du ywr~r.0params r zfigure..sV%t#VzCIgnoring specified arguments in this call because figure with num: z already existsrirc3$K|]}|du ywr~rrys rr|zfigure..sTeT!Tr}allz)close('all') closes all existing figures.zfigure.max_open_warningz More than a figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). Consider using `matplotlib.pyplot.close()`.)figsizedpirqrrrsrz figure.hooks:r)& get_fignums isinstancer get_figurerrranyrr r:rr set_activemaxstr get_figlabelsrintget_fig_managerr lenRuntimeWarningrr set_labelr importlib import_moduler_set_new_active_managerrrrr_auto_draw_if_interactivestale_callbackrt)rrrrqrrrsrrtrallnumsroot_fignext_num fig_label all_labelsinumrmax_open_warningr hookspecs module_name dotted_namer]parts rrrgslmG#z">>t>, ?? " " *IJ JV'3 91UVVHOO,C,C,G,G7,R   %__44889J K %%hoo&=&=>#*s7|aHI { Ti/ST TC7N   ,,/5A B c3 I&J *%&&'RS!'' 2dmc(C  005G#$=> w<+ 0q 0   -./>?  % / c9g#/(./nn##  MM) $!.1 I'0s'; $K ..{;C#))#. )c4( ) H   227;   0 6 6 6!:C  ##% >>  rc*|rtjrp|jjsU|jjs>|jj 5|jj dddyyyyy#1swYyxYw)z An internal helper function for making sure that auto-redrawing works as intended in the plain python repl. Parameters ---------- fig : Figure A figure object which is assumed to be associated with a canvas N)rrr is_saving_is_idle_drawing_idle_draw_cntxr)rvals rrr1s| ))+JJ((*JJ// ZZ ' ' ) # JJ " # # 0+, # #s !B  Bctjj}||jjSt S)a Get the current figure. If there is currently no figure on the pyplot figure stack, a new one is created using `~.pyplot.figure()`. (To test whether there is currently a figure on the pyplot figure stack, check whether `~.pyplot.get_fignums()` is empty.) )rrrrr)rs rrrFs5  ++-G~~$$$xrcxt|trtjj |S|t vS)z Return whether the figure with the given id exists. Parameters ---------- num : int or str A figure identifier. Returns ------- bool Whether or not a figure with id *num* exists. )rrrr has_fignumrrs r fignum_existsrVs: c3  %%c*MO #rcHttjjS)z)Return a list of existing figure numbers.)sortedrrfigsrrrrrks .$$)) **rctjj}|jd|Dcgc]&}|jj j (c}Scc}w)z(Return a list of existing figure labels.c|jSr~r)ms rzget_figlabels..ss r)key)rrget_all_fig_managerssortrr get_label)managersrs rrrpsI!!668H MMoM&19 :AAHHOO % % ' :: :s+A$c>tjjS)ah Return the figure manager of the current figure. The figure manager is a container for the actual backend-depended window that displays the figure on screen. If no current figure exists, a new one is created, and its figure manager is returned. Returns ------- `.FigureManagerBase` or backend-dependent subclass thereof )rrrrrrget_current_fig_managerrws 5<<  rcJtjj||Sr~)rr mpl_connect)srs rconnectrs 5<< # #At ,,rcJtjj|yr~)rrmpl_disconnect)cids r disconnectrsELL$rc|Atjj}|ytjj|y|dk(rtjj yt |t r tjj|yt|dr*tjj|j yt |trKt}||vr1 and M>1 are returned as a 2D array. - If False, no squeezing at all is done: the returned Axes object is always a 2D array containing Axes instances, even if it ends up being 1x1. width_ratios : array-like of length *ncols*, optional Defines the relative widths of the columns. Each column gets a relative width of ``width_ratios[i] / sum(width_ratios)``. If not given, all columns will have the same width. Equivalent to ``gridspec_kw={'width_ratios': [...]}``. height_ratios : array-like of length *nrows*, optional Defines the relative heights of the rows. Each row gets a relative height of ``height_ratios[i] / sum(height_ratios)``. If not given, all rows will have the same height. Convenience for ``gridspec_kw={'height_ratios': [...]}``. subplot_kw : dict, optional Dict with keywords passed to the `~matplotlib.figure.Figure.add_subplot` call used to create each subplot. gridspec_kw : dict, optional Dict with keywords passed to the `~matplotlib.gridspec.GridSpec` constructor used to create the grid the subplots are placed on. **fig_kw All additional keyword arguments are passed to the `.pyplot.figure` call. Returns ------- fig : `.Figure` ax : `~matplotlib.axes.Axes` or array of Axes *ax* can be either a single `~.axes.Axes` object, or an array of Axes objects if more than one subplot was created. The dimensions of the resulting array can be controlled with the squeeze keyword, see above. Typical idioms for handling the return value are:: # using the variable ax for single a Axes fig, ax = plt.subplots() # using the variable axs for multiple Axes fig, axs = plt.subplots(2, 2) # using tuple unpacking for multiple Axes fig, (ax1, ax2) = plt.subplots(1, 2) fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2) The names ``ax`` and pluralized ``axs`` are preferred over ``axes`` because for the latter it's not clear if it refers to a single `~.axes.Axes` instance or a collection of these. See Also -------- .pyplot.figure .pyplot.subplot .pyplot.axes .Figure.subplots .Figure.add_subplot Examples -------- :: # First create some toy data: x = np.linspace(0, 2*np.pi, 400) y = np.sin(x**2) # Create just a figure and only one subplot fig, ax = plt.subplots() ax.plot(x, y) ax.set_title('Simple plot') # Create two subplots and unpack the output array immediately f, (ax1, ax2) = plt.subplots(1, 2, sharey=True) ax1.plot(x, y) ax1.set_title('Sharing Y axis') ax2.scatter(x, y) # Create four polar Axes and access them through the returned array fig, axs = plt.subplots(2, 2, subplot_kw=dict(projection="polar")) axs[0, 0].plot(x, y) axs[1, 1].scatter(x, y) # Share a X axis with each column of subplots plt.subplots(2, 2, sharex='col') # Share a Y axis with each row of subplots plt.subplots(2, 2, sharey='row') # Share both X and Y axes with all subplots plt.subplots(2, 2, sharex='all', sharey='all') # Note that this is the same as plt.subplots(2, 2, sharex=True, sharey=True) # Create figure number 10 with a single subplot # and clears it if it already exists. fig, ax = plt.subplots(num=10, clear=True) ) rrrrrrrrrr)rr) rrrrrrrrrrraxss rrrUsEv  6 C ,,U%v&:#.m$0  2C 8Or)rrrrempty_sentinelrrper_subplot_kwc yr~r mosaicrrrrrrrrrs rsubplot_mosaicrs69rc yr~rrs rrrs58rc yr~rrs rrrs;>rrc Ttdi| } | j||||||||| } | | fS)a Build a layout of Axes based on ASCII art or nested lists. This is a helper function to build complex GridSpec layouts visually. See :ref:`mosaic` for an example and full API documentation Parameters ---------- mosaic : list of list of {hashable or nested} or str A visual layout of how you want your Axes to be arranged labeled as strings. For example :: x = [['A panel', 'A panel', 'edge'], ['C panel', '.', 'edge']] produces 4 Axes: - 'A panel' which is 1 row high and spans the first two columns - 'edge' which is 2 rows high and is on the right edge - 'C panel' which in 1 row and 1 column wide in the bottom left - a blank space 1 row and 1 column wide in the bottom center Any of the entries in the layout can be a list of lists of the same form to create nested layouts. If input is a str, then it must be of the form :: ''' AAE C.E ''' where each character is a column and each line is a row. This only allows only single character Axes labels and does not allow nesting but is very terse. sharex, sharey : bool, default: False If True, the x-axis (*sharex*) or y-axis (*sharey*) will be shared among all subplots. In that case, tick label visibility and axis units behave as for `subplots`. If False, each subplot's x- or y-axis will be independent. width_ratios : array-like of length *ncols*, optional Defines the relative widths of the columns. Each column gets a relative width of ``width_ratios[i] / sum(width_ratios)``. If not given, all columns will have the same width. Convenience for ``gridspec_kw={'width_ratios': [...]}``. height_ratios : array-like of length *nrows*, optional Defines the relative heights of the rows. Each row gets a relative height of ``height_ratios[i] / sum(height_ratios)``. If not given, all rows will have the same height. Convenience for ``gridspec_kw={'height_ratios': [...]}``. empty_sentinel : object, optional Entry in the layout to mean "leave this space empty". Defaults to ``'.'``. Note, if *layout* is a string, it is processed via `inspect.cleandoc` to remove leading white space, which may interfere with using white-space as the empty sentinel. subplot_kw : dict, optional Dictionary with keywords passed to the `.Figure.add_subplot` call used to create each subplot. These values may be overridden by values in *per_subplot_kw*. per_subplot_kw : dict, optional A dictionary mapping the Axes identifiers or tuples of identifiers to a dictionary of keyword arguments to be passed to the `.Figure.add_subplot` call used to create each subplot. The values in these dictionaries have precedence over the values in *subplot_kw*. If *mosaic* is a string, and thus all keys are single characters, it is possible to use a single string instead of a tuple as keys; i.e. ``"AB"`` is equivalent to ``("A", "B")``. .. versionadded:: 3.7 gridspec_kw : dict, optional Dictionary with keywords passed to the `.GridSpec` constructor used to create the grid the subplots are placed on. **fig_kw All additional keyword arguments are passed to the `.pyplot.figure` call. Returns ------- fig : `.Figure` The new figure dict[label, Axes] A dictionary mapping the labels to the Axes objects. The order of the Axes is left-to-right and top-to-bottom of their position in the total layout. )rrrrrrrrr)rr) rrrrrrrrrrrax_dicts rrr(sKj  6 C  f#,;%% !G <rc | t}|\}}tj|||}|j|||} |j| fi|S)a Create a subplot at a specific location inside a regular grid. Parameters ---------- shape : (int, int) Number of rows and of columns of the grid in which to place axis. loc : (int, int) Row number and column number of the axis location within the grid. rowspan : int, default: 1 Number of rows for the axis to span downwards. colspan : int, default: 1 Number of columns for the axis to span to the right. fig : `.Figure`, optional Figure to place the subplot in. Defaults to the current figure. **kwargs Additional keyword arguments are handed to `~.Figure.add_subplot`. Returns ------- `~.axes.Axes` The Axes of the subplot. The returned Axes can actually be an instance of a subclass, such as `.projections.polar.PolarAxes` for polar projections. Notes ----- The following call :: ax = subplot2grid((nrows, ncols), (row, col), rowspan, colspan) is identical to :: fig = gcf() gs = fig.add_gridspec(nrows, ncols) ax = fig.add_subplot(gs[row:row+rowspan, col:col+colspan]) )rowspancolspan)rr_check_gridspec_existsnew_subplotspecr) shapelocr r rrrowscolsgs subplotspecs r subplot2gridrs[X {eJD$  ( (dD 9B$$S'7$KK 3??; 1& 11rc>| t}|j}|S)a  Make and return a second Axes that shares the *x*-axis. The new Axes will overlay *ax* (or the current Axes if *ax* is *None*), and its ticks will be on the right. Examples -------- :doc:`/gallery/subplots_axes_and_figures/two_scales` )rtwinxrax1s rrr  z U ((*C Jrc>| t}|j}|S)a Make and return a second Axes that shares the *y*-axis. The new Axes will overlay *ax* (or the current Axes if *ax* is *None*), and its ticks will be on the top. Examples -------- :doc:`/gallery/subplots_axes_and_figures/two_scales` )rtwinyrs rrrrrc$| t}|jjj}t |dr ddlm}t||jSt |dr"ddlm }t||jdytd) zr Launch a subplot tool window for a figure. Returns ------- `matplotlib.widgets.SubplotTool` Nconfigure_subplotsr)NavigationToolbar2 trigger_tool)ToolContainerBaserzHsubplot_tool can only be launched for figures with an associated toolbar) rrrtoolbarrmatplotlib.backend_basesrrrrrr) targetfigtbrrs r subplot_toolr$sE    ! ! ) )Br'(?&+>>@@ ^ $> #00<12 2rc`t}||j }|j|y)a@ Turn the Axes box on or off on the current Axes. Parameters ---------- on : bool or None The new `~matplotlib.axes.Axes` box state. If ``None``, toggle the state. See Also -------- :meth:`matplotlib.axes.Axes.set_frame_on` :meth:`matplotlib.axes.Axes.get_frame_on` N)r get_frame_on set_frame_on)onrs rboxr)s+ B z" "OOBrcft}|s|s|jS|j|i|}|S)a Get or set the x limits of the current Axes. Call signatures:: left, right = xlim() # return the current xlim xlim((left, right)) # set the xlim to left, right xlim(left, right) # set the xlim to left, right If you do not specify args, you can pass *left* or *right* as kwargs, i.e.:: xlim(right=3) # adjust the right leaving left unchanged xlim(left=1) # adjust the left leaving right unchanged Setting limits turns autoscaling off for the x-axis. Returns ------- left, right A tuple of the new x-axis limits. Notes ----- Calling this function with no arguments (e.g. ``xlim()``) is the pyplot equivalent of calling `~.Axes.get_xlim` on the current Axes. Calling this function with arguments is the pyplot equivalent of calling `~.Axes.set_xlim` on the current Axes. All arguments are passed though. )rget_xlimset_xlimrrrrets rxlimr/+6< B {{} "++t &v &C Jrcft}|s|s|jS|j|i|}|S)a Get or set the y-limits of the current Axes. Call signatures:: bottom, top = ylim() # return the current ylim ylim((bottom, top)) # set the ylim to bottom, top ylim(bottom, top) # set the ylim to bottom, top If you do not specify args, you can alternatively pass *bottom* or *top* as kwargs, i.e.:: ylim(top=3) # adjust the top leaving bottom unchanged ylim(bottom=1) # adjust the bottom leaving top unchanged Setting limits turns autoscaling off for the y-axis. Returns ------- bottom, top A tuple of the new y-axis limits. Notes ----- Calling this function with no arguments (e.g. ``ylim()``) is the pyplot equivalent of calling `~.Axes.get_ylim` on the current Axes. Calling this function with arguments is the pyplot equivalent of calling `~.Axes.set_ylim` on the current Axes. All arguments are passed though. )rget_ylimset_ylimr-s rylimr4Pr0rminorc t}||j|}|td|j||}g}|.|j |}|D]}|j |||fS|j |fd|i|}||fS)az Get or set the current tick locations and labels of the x-axis. Pass no arguments to return the current values without modifying them. Parameters ---------- ticks : array-like, optional The list of xtick locations. Passing an empty list removes all xticks. labels : array-like, optional The labels to place at the given *ticks* locations. This argument can only be passed if *ticks* is passed as well. minor : bool, default: False If ``False``, get/set the major ticks/labels; if ``True``, the minor ticks/labels. **kwargs `.Text` properties can be used to control the appearance of the labels. .. warning:: This only sets the properties of the current ticks, which is only sufficient if you either pass *ticks*, resulting in a fixed list of ticks, or if the plot is static. Ticks are not guaranteed to be persistent. Various operations can create, delete and modify the Tick instances. There is an imminent risk that these settings can get lost if you work on the figure further (including also panning/zooming on a displayed figure). Use `~.pyplot.tick_params` instead if possible. Returns ------- locs The list of xtick locations. labels The list of xlabel `.Text` objects. Notes ----- Calling this function with no arguments (e.g. ``xticks()``) is the pyplot equivalent of calling `~.Axes.get_xticks` and `~.Axes.get_xticklabels` on the current Axes. Calling this function with arguments is the pyplot equivalent of calling `~.Axes.set_xticks` and `~.Axes.set_xticklabels` on the current Axes. Examples -------- >>> locs, labels = xticks() # Get the current locations and labels. >>> xticks(np.arange(0, 1, step=0.2)) # Set label locations. >>> xticks(np.arange(3), ['Tom', 'Dick', 'Sue']) # Set text labels. >>> xticks([0, 1, 2], ['January', 'February', 'March'], ... rotation=20) # Set text labels and properties. >>> xticks([]) # Disable xticks. r5zAxticks(): Parameter 'labels' can't be set without setting 'ticks'r6)r get_xticksr set_xticksget_xticklabels_internal_updateset_xticklabelstickslabelsr6rrlocs labels_outls rxticksrCus@ B }}}5})  67 7}}U%}0J ~''e'4  'A  v & '  (R''FeFvF  rc t}||j|}|td|j||}g}|.|j |}|D]}|j |||fS|j |fd|i|}||fS)ay Get or set the current tick locations and labels of the y-axis. Pass no arguments to return the current values without modifying them. Parameters ---------- ticks : array-like, optional The list of ytick locations. Passing an empty list removes all yticks. labels : array-like, optional The labels to place at the given *ticks* locations. This argument can only be passed if *ticks* is passed as well. minor : bool, default: False If ``False``, get/set the major ticks/labels; if ``True``, the minor ticks/labels. **kwargs `.Text` properties can be used to control the appearance of the labels. .. warning:: This only sets the properties of the current ticks, which is only sufficient if you either pass *ticks*, resulting in a fixed list of ticks, or if the plot is static. Ticks are not guaranteed to be persistent. Various operations can create, delete and modify the Tick instances. There is an imminent risk that these settings can get lost if you work on the figure further (including also panning/zooming on a displayed figure). Use `~.pyplot.tick_params` instead if possible. Returns ------- locs The list of ytick locations. labels The list of ylabel `.Text` objects. Notes ----- Calling this function with no arguments (e.g. ``yticks()``) is the pyplot equivalent of calling `~.Axes.get_yticks` and `~.Axes.get_yticklabels` on the current Axes. Calling this function with arguments is the pyplot equivalent of calling `~.Axes.set_yticks` and `~.Axes.set_yticklabels` on the current Axes. Examples -------- >>> locs, labels = yticks() # Get the current locations and labels. >>> yticks(np.arange(0, 1, step=0.2)) # Set label locations. >>> yticks(np.arange(3), ['Tom', 'Dick', 'Sue']) # Set text labels. >>> yticks([0, 1, 2], ['January', 'February', 'March'], ... rotation=45) # Set text labels and properties. >>> yticks([]) # Disable yticks. r5zAyticks(): Parameter 'labels' can't be set without setting 'ticks'r6)r get_yticksr set_yticksget_yticklabelsr;set_yticklabelsr=s ryticksrIs~ B }}}5})  67 7}}U%}0J ~''e'4  'A  v & '  (R''FeFvF  rc Bt}t|ts tdt d||||fDr:|s8|j j }|j j}||fS| td|j|f|||d|\}}||fS)a Get or set the radial gridlines on the current polar plot. Call signatures:: lines, labels = rgrids() lines, labels = rgrids(radii, labels=None, angle=22.5, fmt=None, **kwargs) When called with no arguments, `.rgrids` simply returns the tuple (*lines*, *labels*). When called with arguments, the labels will appear at the specified radial distances and angle. Parameters ---------- radii : tuple with floats The radii for the radial gridlines labels : tuple with strings or None The labels to use at each radial gridline. The `matplotlib.ticker.ScalarFormatter` will be used if None. angle : float The angular position of the radius labels in degrees. fmt : str or None Format string used in `matplotlib.ticker.FormatStrFormatter`. For example '%f'. Returns ------- lines : list of `.lines.Line2D` The radial gridlines. labels : list of `.text.Text` The tick labels. Other Parameters ---------------- **kwargs *kwargs* are optional `.Text` properties for the labels. See Also -------- .pyplot.thetagrids .projections.polar.PolarAxes.set_rgrids .Axis.get_gridlines .Axis.get_ticklabels Examples -------- :: # set the locations of the radial gridlines lines, labels = rgrids( (0.25, 0.5, 1.0) ) # set the locations and labels of the radial gridlines lines, labels = rgrids( (0.25, 0.5, 1.0), ('Tom', 'Dick', 'Harry' )) z"rgrids only defined for polar Axesc3$K|]}|du ywr~r)rzps rr|zrgrids..d s :19 :r}z7'radii' cannot be None when other parameters are passed)r?anglefmt) rrr$rryaxis get_gridlinesget_ticklabelsr set_rgrids)radiir?rMrNrr lines_outrAs rrgridsrU sB B b) $?@@ :ufeS9 ::6"$(("8"8": !#!8!8!: j  QRR - !B 3!B:@!B : j  rc >t}t|ts tdt d|||fDr:|s8|j j }|j j}||fS| td|j|f||d|\}}||fS)a Get or set the theta gridlines on the current polar plot. Call signatures:: lines, labels = thetagrids() lines, labels = thetagrids(angles, labels=None, fmt=None, **kwargs) When called with no arguments, `.thetagrids` simply returns the tuple (*lines*, *labels*). When called with arguments, the labels will appear at the specified angles. Parameters ---------- angles : tuple with floats, degrees The angles of the theta gridlines. labels : tuple with strings or None The labels to use at each radial gridline. The `.projections.polar.ThetaFormatter` will be used if None. fmt : str or None Format string used in `matplotlib.ticker.FormatStrFormatter`. For example '%f'. Note that the angle in radians will be used. Returns ------- lines : list of `.lines.Line2D` The theta gridlines. labels : list of `.text.Text` The tick labels. Other Parameters ---------------- **kwargs *kwargs* are optional `.Text` properties for the labels. See Also -------- .pyplot.rgrids .projections.polar.PolarAxes.set_thetagrids .Axis.get_gridlines .Axis.get_ticklabels Examples -------- :: # set the locations of the angular gridlines lines, labels = thetagrids(range(45, 360, 90)) # set the locations and labels of the angular gridlines lines, labels = thetagrids(range(45, 360, 90), ('NE', 'NW', 'SW', 'SE')) z&thetagrids only defined for polar Axesc3$K|]}|du ywr~rrys rr|zthetagrids.. s ginputrrrwaitforbuttonpressr)_get_pyplot_commands)NON_PLOT_COMMANDSnames rget_plot_commandsrd s7 423 .T,,  .. .s !cdddhttjtt fdt j DS)N colormapscolorsrdc3K|]J\}}|jds4|vr0tj|rtj|ur|Lyw)rN)rr isfunction getmodule)rzrcr]exclude this_modules rr|z'_get_pyplot_commands.. sQ6ss#G(;!!#&  %4 6sAA)rfrrjrdrr%items)rkrls@@rrara sKH&9FIFG##$56K 6%ioo/6 66rc t|t}| tdtj|f||d|}|S)NzNo mappable was found to use for colorbar creation. First define a mappable such as an image (with imshow) or a contour set (with contourf).)caxr)gcirrcolorbar)mappablerorrr.s rrqrq sN5   12 2 #%.. DwTYY B ~ DrcBtjj||Sr~)rr~imread)rVrs rrr2 s    " "5& 11rc Ftjj||fi|yr~)rr~imsave)rVarrrs rrr9 sE31&1rc tj|}|dk(r t}n9|t|rd}n t |}t ||}|j d}|j|fi|}t||S)u Display a 2D array as a matrix in a new figure window. The origin is set at the upper left hand corner. The indexing is ``(row, column)`` so that the first index runs vertically and the second index runs horizontally in the figure: .. code-block:: none A[0, 0] ⋯ A[0, M-1] ⋮ ⋮ A[N-1, 0] ⋯ A[N-1, M-1] The aspect ratio of the figure window is that of the array, unless this would make an excessively short or narrow figure. Tick labels for the xaxis are placed on top. Parameters ---------- A : 2D array-like The matrix to be displayed. fignum : None or int If *None*, create a new, appropriately sized figure window. If 0, use the current Axes (creating one if there is none, without ever adjusting the figure size). Otherwise, create a new Axes on the figure with the given number (creating it at the appropriate size if it does not exist, but not adjusting the figure size otherwise). Note that this will be drawn on top of any preexisting Axes on the figure. Returns ------- `~matplotlib.image.AxesImage` Other Parameters ---------------- **kwargs : `~matplotlib.axes.Axes.imshow` arguments rN)r)g333333?g ףp= ??r) np asanyarrayrrrrrmatshowsci)Afignumrrrrr1s rrr@ szX aA { U  -"7G lGVW- \\4 5 A  BG Irctjr2t}t|ts$t j ddn td}|j|i|S)a Make a polar plot. call signature:: polar(theta, r, [fmt], **kwargs) This is a convenience wrapper around `.pyplot.plot`. It ensures that the current Axes is polar (or creates one if needed) and then passes all parameters to ``.pyplot.plot``. .. note:: When making polar plots using the :ref:`pyplot API `, ``polar()`` should typically be the first command because that makes sure a polar Axes is created. Using other commands such as ``plt.title()`` before this can lead to the implicit creation of a rectangular Axes, in which case a subsequent ``polar()`` call will fail. z3.10a There exists a non-polar current Axes. Therefore, the resulting plot from 'polar()' is non-polar. You likely should call 'polar()' before any other pyplot plotting commands. Support for this scenario is deprecated in %(since)s and will raise an error in %(removal)s)rr)r) rget_axesrrr$r warn_deprecatedrplot)rrrs rrr} sY( u~~ U"i(  = W % 277D #F ##rbackend_fallbackwebaggnbaggr) colorizerc  Ntj|f||||||||| | d | S)N) xoyoalphanormrrurvoriginresizer)rfigimage) Xrrrrrrurvrrrrs rrr sI 35>>           rc @tj|||fd|i|SNfontdict)rtextxyrrrs rfigtextr % 35::aA ; ;F ;;rc2tjSr~)rrrrrrr s 599;rc2tjSr~)r_gcirrrrprp s 5::<rc@tj||||||S)Nntimeout show_clicks mouse_add mouse_pop mouse_stop)rr_rs rr_r_ s. 5<<   rcBtj||||||y)Nleftbottomrighttopwspacehspace)rsubplots_adjustrs rrr s&E &3vfrc 8tj|fi|Sr~)rsuptitle)trs rrr s 35>>! &v &&rgHzG?padh_padw_padrectc>tj||||y)Nr)r tight_layoutrs rrr sE3e5tDrc6tj|S)Nr)rr`rs rr`r` s 5 # #G # 44r)datac Htj|fi|d|ini|SNr)racorr)rrrs rrr% s, 35;;q St/?fd^R SF SSrc Ttj|f|||||d|d|ini|SN)FsFcwindowpad_tosidesr)rangle_spectrumrrrrrrrrs rrr- Q 35      "-FD>2    rc Ftj||f|||||d|S)N)xytextxycoords textcoords arrowpropsannotation_clip)rannotate)rxyrrrrrrs rrrF s? 35>>   '    rc >tj||||fi|Sr~)rarrow)rrdxdyrs rrr^ s 35;;q!R .v ..rbothc<tj|||y)Nenableaxistight)r autoscalers rrrd s EOO6EO:rc >tjd|||d|S)N)rxminxmaxr)raxhline)rrrrs rrrn ! 35== =14d =f ==rc @tj||f||d|S)N)rr)raxhspan)yminymaxrrrs rrrt % 35==t D$T DV DDr)emitc <tj|fd|i|S)Nr)rr)rrrs rrr| s! 35::c / / //r)slopec >tj|f||d|S)N)xy2r)raxline)xy1rrrs rrr s# 35<< <E tjd|||d|S)N)rrrr)raxvline)rrrrs rrr rrc @tj||f||d|S)N)rr)raxvspan)rrrrrs rrr rrcenter)alignrc Rtj||f|||d|d|ini|S)N)widthrrr)rbar)rheightrrrrrs rrr sN 3599     "-FD>2    rcFtj|i|d|ini|Sr)rbarbsrrrs rrr s+ 35;; W43C&$ WPV WWrc Rtj||f|||d|d|ini|S)N)rrrr)rbarh)rrrrrrrs rr r  sN 35::       "-FD>2    rz%gedge)rN label_typepaddingc Btj|f||||d|S)N)r?rNr r )r bar_label) containerr?rNr r rs rrr s7 35??       rverticalctj|fid|d|d|d|d|d|d|d|d | d | d | d | d | d|d|d|d|d|d|d|d|d|d|d|d|d|d|d||d|iSiS)Nnotchsymvert orientationwhis positionswidths patch_artist bootstrap usermediansconf_intervalsmeanline showmeansshowcapsshowbox showfliersboxprops tick_labels flierprops medianprops meanpropscapprops whiskerprops manage_ticks autorangezorder capwidthslabelr)rboxplot)rrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-rs rr.r. sND 35==               "    &     ! "# $% & ' () * + ,- ./ 0"1 2"3 45 67 89 :!-FD>= <46= rc Jtj||fi|d|ini|Sr)r broken_barh)xrangesyrangerrs rr0r00 s; 35   .2.>VTNB KQ rc <tj|fd|i|S)Nlevels)rclabel)CSr4rs rr5r5> s 35<< 46 4V 44rdefaultc  ^tj||f|||||||| | d | d| ini| S)N) NFFTrrdetrendrnoverlaprr scale_by_freqr)rcohere) rrr:rrr;rr<rrr=rrs rr>r>D s`& 35<<    # "-FD>2   rcxtj|i|d|ini|}|j t||Sr)rcontour_Arrrr__rets rr@r@i sJ CEMM  $($464." AG E xx E Lrcxtj|i|d|ini|}|j t||Sr)rcontourfrArrBs rrErEt sJ CENN  $($464." AG E xx E Lrc  `tj||f|||||||| | | d | d| ini| SN) r:rrr;rr<rrr= return_liner)rcsd)rrr:rrr;rr<rrr=rHrrs rrIrI sc( 3599    # "-FD>2   r) complementaryrcompressrc Rtj|f||||d|d|ini|S)N)weightsrJrrKr)recdf)rrMrJrrKrrs rrNrN sL 35::  #   "-FD>2    rc ftj||f|||||||| | | | | |d |d|ini|S)N) yerrxerrrNecolor elinewidthcapsize barsabovelolimsuplimsxlolimsxuplims erroreverycapthickr)rerrorbar)rrrPrQrNrRrSrTrUrVrWrXrYrZr[rrs rr\r\ sl* 35>>       "-FD>2! " # rc Xtj|f|||||||d|d|ini| S)N)r lineoffsets linelengths linewidthsrgr linestylesr)r eventplot) rrr^r_r`rgrrarrs rrbrb sU 35??  "-FD>2    rcFtj|i|d|ini|Sr)rfillrs rrdrd s* 35::t V$2B Vv VVrc Ttj||f||||d|d|ini|S)N)y2where interpolatestepr)r fill_between)ry1rfrgrhrirrs rrjrj sS 35        "-FD>2    rc Ttj||f||||d|d|ini|S)N)x2rgrirhr)r fill_betweenx)rx1rmrgrirhrrs rrnrn$ sS 35        "-FD>2    rc @tjd|||d|y)N)visiblewhichrr)rgrid)rqrrrrs rrsrs= s CEJJAwe$A&Arlinearfacec tj||fid|d|d|d|d|d|d|d| d | d | d | d | d |d|d|d|d||d|ini|}t||S)NCgridsizebinsxscaleyscaleextentrrrurvrr` edgecolorsreduce_C_functionmincnt marginalsrr)rhexbinr)rrrwrxryrzr{r|rrrurvrr`r}r~rrrrrrCs rrrH s2 CELL                       ,! "# $% &!-FD>2) * + E.J Lrc ftj|f||||||||| | | | | |d|d|ini|S)N)ryrangedensityrM cumulativerhisttyperrrwidthlogcolorr-stackedr)rhist)rryrrrMrrrrrrrrr-rrrs rrr} sj2 35::      "-FD>2! " # r)rbaselinerdrc Rtj|f||||d|d|ini|S)N)edgesrrrdr)rstairs)valuesrrrrdrrs rrr sL 35<<     "-FD>2    rrc xtj||f||||||d|d|ini| } t| d| S)N)ryrrrMcmincmaxrr)rhist2dr) rrryrrrMrrrrrCs rrr sf CELL      "-FD>2   Eb N Lrc Ttj|||f|||d|d|ini|SN)rgrar-r)rhlines)rrrrgrar-rrs rrr Q 35<<     "-FD>2    r@)aspect interpolationrrurvrrr|interpolation_stage filternorm filterradresampleurlrc tj|f||||||||| | | | | ||d|d|ini|}t||S)N)rrrrrrurvrrr|rrrrrr)rimshowr)rrrrrrrurvrrr|rrrrrrrrCs rrr sx, CELL    #  / ! ""-FD>2# $ % E(J Lrc6tj|i|Sr~)rrrs rrr* 35<< ( ((rc >tjd||d|y)N)rrr)rlocator_params)rrrs rrr0s CE:d%:6:rc6tj|i|Sr~)rloglogrs rrr8rrc Vtj|f||||||d|d|ini|S)N)rrrrrrnr)rmagnitude_spectrum) rrrrrrrnrrs rrr>sT $35 # #    "-FD>2    rrrrc:tj||||dS)Nr)rmargins)rrrrs rrrYs 35=='Q!5 99rc4tjyr~)rminorticks_offrrrrrdsErc4tjyr~)r minorticks_onrrrrrjsEr)shadingrrrrurvrrc ptj||||||||d|d|ini| } t| | S)N)rrrrrurvrr)rpcolorr) rrrrrurvrrrrrCs rrrps[ CELL      "-FD>2   EJ Lr) rrrrurvrr antialiasedrc rtj| ||||||||d|d|ini| } t| | S)N)rrrrurvrrrr)r pcolormeshr) rrrrurvrrrrrrrCs rrrs` CE        "-FD>2   EJ Lrc Ttj|f|||||d|d|ini|Sr)rphase_spectrumrs rrrrr) normalizehatchrctj|fid|d|d|d|d|d|d|d|d | d | d | d | d | d|d|d|d||d|iSiS)Nexploder?rgautopct pctdistanceshadow labeldistance startangleradius counterclock wedgeprops textpropsrframe rotatelabelsrrr)rpie)rrr?rgrrrrrrrrrrrrrrrs rrrs. 3599             $   "      "! "# $!-FD>' &46' r)scalexscaleyrcLtj|||d|d|ini|S)N)rrr)rr)rrrrrs rrrsA 35::  "-FD>2     rc Ttj||f||||d|d|ini|S)N)rNtzxdateydater)r plot_date)rrrNrrrrrs rrrsQ 35??      "-FD>2    rc  ^tj|f||||||||| | d | d| ini| SrG)rpsd) rr:rrr;rr<rrr=rHrrs rrr!s^& 3599    # "-FD>2   rc`tj|i|d|ini|}t||Sr)rquiverrrBs rrrFs@ CELL  $($464." AG EJ Lrc @tj|||||fi|Sr~)r quiverkey)QrYUr-rs rrrPs$ 35??1aAu 7 77r)r}r plotnonfiniterc  ~tj||f|||||||| | | | | d |d|ini|}t||S)N) rcmarkerrrrurvrr`r}rrr)rscatterr)rrrrrrrrurvrr`r}rrrrrCs rrrXst( CEMM        # "-FD>2  ! E$J Lrc6tj|i|Sr~)rsemilogxrs rrr 35>>4 *6 **rc6tj|i|Sr~)rsemilogyrs rrrrrc tj|f||||||||| | | | | ||d|d|ini|}t|d|S)N)r:rrr;rr<rxextentrrr=modernrurvrr)rspecgramr)rr:rrr;rr<rrrrr=rrnrurvrrrCs rrrs|0 CENN     #   ! ""-FD>2# $ % E(b N Lrc ~tj|f|||||d|}t|tr t ||S)N) precisionr markersizerr)rspyrr%r)ZrrrrrrrCs rrrsP CEII      E%,- E Lrrzero)r?rgrrrcXtj|g|||||d|d|ini|S)N)r?rgrrr)r stackplot)rr?rgrrrrrs rrrsV 35??     "-FD>2    r)linefmt markerfmtbasefmtrr-rrc Ttj|||||||d|d|iSiS)N)rrrrr-rr)rstem)rrrrr-rrrs rrrsP 35::  "-FD>  46  rpre)rgrcTtj||g|d|i|d|ini|S)Nrgr)rri)rrrgrrrs rririsR 35::        "-FD>2     rctj||||f|||||| | | | | ||||d|d|ini}t|j|S)N)rrgrrr arrowsize arrowstyle minlength transformr+ start_points maxlengthintegration_directionbroken_streamlinesr)r streamplotrlines)rruvrrgrrrrrrrr+rrrrrrCs rrrs}. CE          !3-% &"-FD>2' E*  Lrc  Rtjd|||||||||| | | | d | S)N) cellText cellColourscellLoc colWidths rowLabels rowColoursrowLoc colLabels colColourscolLocrbboxrr)rtable)rrrr r r r r rrrrrrs rrrGsO" 35;;      rc @tj|||fd|i|Sr)rrrs rrrkrrc <tjdd|i|y)Nrr)r tick_params)rrs rrrssCE*4*6*rrr scilimits useOffset useLocale useMathTextcBtj||||||y)Nr)rticklabel_formatrs rrrys+E  rchtj|i|}|j t||Sr~)r tricontourrArrrrCs rrrs1 CE  d -f -E xx E Lrchtj|i|}|j t||Sr~)r tricontourfrArrs rr r s1 CE  t .v .E xx E Lrg?flatrrrrurvr facecolorsc `tj||||||||d|} t| | S)Nr")r tripcolorr) rrrrurvrr#rrrCs rr%r%sF CEOO        EJ Lrc6tj|i|Sr~)rtriplotrs rr'r's 35==$ )& ))rc `tj|f||||||||| | | d | d| iSiS)N) rrrrr showextrema showmedians quantilespoints bw_methodsider)r violinplot) datasetrrrrrr)r*r+r,r-r.rs rr/r/sf& 35      "-FD> 46 rc Ttj|||f|||d|d|ini|Sr)rvlines)rrrrgrar-rrs rr2r2rrc Ttj||f||||d|d|ini|S)N)normedr; usevlinesmaxlagsr)rxcorr)rrr4r;r5r6rrs rr7r7sQ 35;;    "-FD>2    rc6tj|yr~)r_sci)r1s rrrsEJJrNr)rc Btj|f||||d|S)N)rrrr)r set_title)r-rrrrrs rtitler<s' 35??5 U8# Uf UUr)rc @tj|f|||d|SN)rlabelpadr)r set_xlabel)xlabelrr?rrs rrArA-2 35   !H# AG rc @tj|f|||d|Sr>)r set_ylabel)ylabelrr?rrs rrErE<rBrc :tj|fi|yr~)r set_xscalevaluers rrzrzKCEU%f%rc :tj|fi|yr~)r set_yscalerHs rr{r{QrJrctdy)z Set the colormap to 'autumn'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. autumnNrrrrrNrNW  Xrctdy)z Set the colormap to 'bone'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. boneNrOrrrrRrRb  Vrctdy)z Set the colormap to 'cool'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. coolNrOrrrrUrUmrSrctdy)z Set the colormap to 'copper'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. copperNrOrrrrWrWxrPrctdy)z Set the colormap to 'flag'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. flagNrOrrrrYrYrSrctdy)z Set the colormap to 'gray'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. grayNrOrrrr[r[rSrctdy)z Set the colormap to 'hot'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. hotNrOrrrr]r]  UOrctdy)z Set the colormap to 'hsv'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. hsvNrOrrrr`r`r^rctdy)z Set the colormap to 'jet'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. jetNrOrrrrbrbr^rctdy)z Set the colormap to 'pink'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. pinkNrOrrrrdrdrSrctdy)z Set the colormap to 'prism'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. prismNrOrrrrfrf  Wrctdy)z Set the colormap to 'spring'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. springNrOrrrririrPrctdy)z Set the colormap to 'summer'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. summerNrOrrrrkrkrPrctdy)z Set the colormap to 'winter'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. winterNrOrrrrmrmrPrctdy)z Set the colormap to 'magma'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. magmaNrOrrrrororgrctdy)z Set the colormap to 'inferno'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. infernoNrOrrrrqrq  Yrctdy)z Set the colormap to 'plasma'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. plasmaNrOrrrrtrtrPrctdy)z Set the colormap to 'viridis'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. viridisNrOrrrrvrvrrrctdy)z Set the colormap to 'nipy_spectral'. This changes the default colormap as well as the colormap of the current image if there is one. See ``help(colormaps)`` for more information. nipy_spectralNrOrrrrxrxs  _rr~)rr1rz Literal[None]rr)rr1rCallable[_P, _R]rry)rr1rzCallable[_P, _R] | NonerzACallable[[Callable[_P, _R]], Callable[_P, _R]] | Callable[_P, _R]r)NNT)rz Artist | Nonerz.Callable[[Artist], bool] | type[Artist] | Nonerrrz list[Artist])rz'type[matplotlib.backend_bases._Backend])r(rrr)rr)rr)rOfloatrr)rSrrr)NN)rRdict[str, Any] | NonerVz'str | pathlib.Path | os.PathLike | NonerzAbstractContextManager[None])rirbr)rnrzrorzrprzrr)NNN)rz%int | str | Figure | SubFigure | NonerArrayLike | Noner float | NonerqColorType | Nonerrr~rsrrz type[Figure]rtrrr)rr)rz int | strrr)rz list[int])rz list[Any])rzFigureManagerBase | None)rrrzCallable[[Event], Any]rr)rrrr)rz*None | int | str | Figure | Literal['all']rr)rrI)rz(None | tuple[float, float, float, float]rmatplotlib.axes.Axes)rmatplotlib.axes.Axes | Nonerr)rr rr)rr )..)r Literal[1]rrr+bool | Literal['none', 'all', 'row', 'col']rrrz Literal[True]rSequence[float] | Nonerrrr{rr{rztuple[Figure, Axes])rrrrrrrrrzLiteral[False]rrrrrr{rr{rztuple[Figure, np.ndarray])rrrrrrrrrrrrrrrr{rr{rztuple[Figure, Any])riri)rrrrrrrr|rr|rrrr{rr{rz2dict[str | tuple[str, ...], dict[str, Any]] | Nonerr1rz.tuple[Figure, dict[str, matplotlib.axes.Axes]])rzlist[HashableList[_T]]rrrrrr|rr|rr\rr{rr{rz0dict[_T | tuple[_T, ...], dict[str, Any]] | Nonerr1rz-tuple[Figure, dict[_T, matplotlib.axes.Axes]])rzlist[HashableList[Hashable]]rrrrrr|rr|rr1rr{rr{rzr|r?Sequence[str] | Noner6rrz*tuple[list[Tick] | np.ndarray, list[Text]])NNNN) rSr|r?Sequence[str | Text] | NonerMr}rN str | Nonertuple[list[Line2D], list[Text]])r[r|r?rrNrrr)rz list[str])rrz(ScalarMappable | ColorizingArtist | Nonerorrz)rNNF)rr6rorrmrrgrrirrhrrr>)Nmajorr)rqrrrz!Literal['major', 'minor', 'both']rrrr)(rr6rr6rwr|rxrryz-Literal['log'] | int | Sequence[float] | NonerzLiteral['linear', 'log']r{rr|rrrrrrur}rvr}rr}r`r}r}z#Literal['face', 'none'] | ColorTyper~z+Callable[[np.ndarray | list[float]], float]rrrrrrrr@)NNFNFNrmidrNFNNF) rrryz"int | Sequence[float] | str | NonerrrrrMr|rz bool | floatrzArrayLike | float | Nonerz2Literal['bar', 'barstacked', 'step', 'stepfilled']rzLiteral['left', 'mid', 'right']rrrr}rrrrr-str | Sequence[str] | Nonerrrzgtuple[np.ndarray | list[np.ndarray], np.ndarray, BarContainer | Polygon | list[BarContainer | Polygon]]) rr6rr|rrrrrdrrrN)rNFNNN)rr6rr6ryzFNone | int | tuple[int, int] | ArrayLike | tuple[ArrayLike, ArrayLike]rr|rrrMr|rr}rr}rz3tuple[np.ndarray, np.ndarray, np.ndarray, QuadMesh])Nrr)rrrrrrrgrrarWr-rrr?)"rzArrayLike | PIL.Image.Imagerrrrr'Literal['equal', 'auto'] | float | Nonerrrrrur}rvr}rrrrr|rrz&Literal['data', 'rgba', 'auto'] | NonerrrrzrrrrrrK)rN)rrrrrr)rr6rr}rrrrrrrrrn)Literal['default', 'linear', 'dB'] | Nonerr) rrzrr}rr}rrrr)rr6rz)Literal['flat', 'nearest', 'auto'] | Nonerr}rrrrrur}rvr}rrrr=)rr6rr}rrrrrur}rvr}rrrz4Literal['flat', 'nearest', 'gouraud', 'auto'] | NonerrrrC)NNNNg333333?Fg?rriTNN)rrFF)&rr6rr|r?rrgrrz#str | Callable[[float], str] | Nonerrzrrrr}rrzrrzrrrr{rr{rrrrrrrrrrrzKtuple[list[Wedge], list[Text]] | tuple[list[Wedge], list[Text], list[Text]])rzfloat | ArrayLike | strrrrrrr)rNTF)rr6rr6rNrrzstr | datetime.tzinfo | Nonerrrrrr)rr6r:rrr}rrr;rrrr<rrrrrr=rrHrrr)rrQ) rrQrrzrrzrrzr-rrrR) NNNNNNNNN)rrrrrrrz2ArrayLike | Sequence[ColorType] | ColorType | NonerzMarkerType | Nonerrrrrur}rvr}rr}r`rr}z@Literal['face', 'none'] | ColorType | Sequence[ColorType] | NonerrrrrrA)NNNNNNNNNNNNNNN)"rr6r:rrr}rrr;rrrr<rrrrrrrrrr=rrz?Literal['default', 'psd', 'magnitude', 'angle', 'phase'] | Nonernrrur}rvr}rz4tuple[np.ndarray, np.ndarray, np.ndarray, AxesImage])rNNequalupper)rr6rzfloat | Literal['present']rrrr}rrrzLiteral['upper', 'lower']rrK)rzArrayLike | strrrrrrrrrzr-rrrrrG)rr6rr6rgzLiteral['pre', 'post', 'mid']rr)riNNNNriz-|>g?NNNrrT) NNrNNNrNNrrNclosed)r)rrrr)rrrz0Literal['', 'sci', 'scientific', 'plain'] | Nonerztuple[int, int] | Nonerzbool | float | Nonerrrrrr) NNrg?FTFNrbNr)r0rrr|rrrrrrrrr)rr*rr+z(Sequence[float | Sequence[float]] | Noner,rr-zMLiteral['scott', 'silverman'] | float | Callable[[GaussianKDE], float] | Noner.zLiteral['both', 'low', 'high']rzdict[str, Collection])rrrrrrrgrrarWr-rrr?)rr6rr6r4rr;z Callable[[ArrayLike], ArrayLike]r5rr6rrr)r1r&rr) r-rrr{r)Literal['left', 'center', 'right'] | Nonerr}rr}rr`) rArrr{r?r}rrrr`) rErrr{r?r}rz)Literal['bottom', 'center', 'top'] | Nonerr`)rIzstr | ScaleBaserr(r __future__r contextlibrrenumrrrrloggingrr6rMtypingrrr r rmatplotlib.imager r r rrrrrrr!rrrmatplotlib.figurerrrmatplotlib.gridspecrrrrrmatplotlib.artistrmatplotlib.axesr r!rr"r#matplotlib.projectionsr$matplotlib.colorizerr%r&r'r(matplotlib.scaler) matplotlib.cmr*matplotlib.colorsr+r,numpyrcollections.abcr-r.r/r0datetimepathlibosr1r2r3r4typing_extensionsr5 PIL.ImagePIL numpy.typingr6matplotlib.axisr7matplotlib.axes._baser8r9r:matplotlib.contourr;r<matplotlib.collectionsr=r>r?r@rArBrCmatplotlib.colorbarrDmatplotlib.containerrErFrGrHmatplotlib.legendrImatplotlib.mlabrJrKrLmatplotlib.patchesrMrNrOmatplotlib.quiverrPrQrRrSmatplotlib.typingrTrUrVrWrXmatplotlib.widgetsrYrZr[r\r]matplotlib.linesr^r_matplotlib.textr`rarbrcrdrerfrgrhtickerrjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r| getLoggerrrrfcolor_sequencesrrrrrrrrrrrrrr__annotations__rrr<rrrrArErDrPrRrUrXrZr[rrarerrrrrrrrrrrrrrrrrreplaceinterpdrrrrrrrrrrr$r)r/r4rCrIrUr\ deprecatedrdrarqrwr|rr~rrrr_get_backend_or_nonerequested_backendlower list_builtin INTERACTIVEavailable_backendssetr_setrrrrrrrpr_LEFTRIGHTMIDDLErrrr`rrrrrrrrrrrrrr rr.r0r5r> detrend_nonewindow_hanningr@rErIrNr\rbrdrjrnrsrmeanrrrrrrrrrrrrrrrrrrrrrrrrrrrrirrrrrr r%r'r/r2r7r9rr;r<r@rArDrErGrzrLr{rNrRrUrWrYr[r]r`rbrdrfrirkrmrorqrtrvrxrrrrs0"L#8  00G%%"!66;;5==$ #?,QQ,$8FF 66+&#$/.,=- ,(+7??::*/ 4B B B(+,77&55JJJJJJ w"  " 9 9 949 9  B B'B,<B B %)  !G09T@*,HI$)) )(X.    & &!!8!894:4!0<@77 977 717@D <C GVr.B C-4`'D%X%P8!/#0#!!6!67 $59,, 2,",8,!!6!678!!2!2!7!78898!!2!2!6!67787!!2!2!7!78898 @AB B#B7<BBR26 $ G!#'"& &G! .G! G!  G! G! G!G!G! G!  !G!T#*  *+ ; "!!1!=!=>-?-!!1!@!@A%B%/7d (!01) == -- ] +  0 1 [ ) 48V+ 1V+V+V+r  rrj  ;>:= +.,/(+),      8  8   ) * & '       ;>:=+.,/(+),      8  8   ) * & '       ;>:=+.,/(+),      8  8   ) * & '    ""#`:?:?+/,0(,)-` `` 7` 8` ` ) ` * `&`'``F %(&)(+),IL 9  9  9  9 # 9 $ 9 9& 9' 9G 9 94 9  9 %(&)(+),GJ 8 " 8  8  8 # 8 $ 8 8& 8' 8E 8 83 8  8 %(&)(+),SV > ( >  >  > # > $ > >& >' >Q > >9 >  >$%)&*(,)-TX~ G~ ~  ~ # ~ $ ~~&~'~Q~~9~F&'12 12!012 12"12 12  12h   2.."J"L##'S S S S  S 0 Sn##'R R R R  R 0 Rl#*. L! L! 'L! L!  L! % L!` $*.I! I! 'I! I! % I!X%.&. 6 !19='+GK6 $ E  2"*/:.!!1!1!8!89CG2,26@22:2 !!1!1!8!892 '2.72 2:2 :z"$P 5557 1 9?P?V?V?X6)66}7P7PQc"4578KKL 4E 4 4 6 i!?!?@!1#'"&/3#'     !     -  2@!-BF< <<<*?< <.<!,- !-. !/ (--(..)00        0&!!7!78               9 !1'2' !!4!4559 E E E  E 3 E  E6E!!:!:;5<5 !,TTJT-T!!4!45BF?C    @    = +60!/*.!$((,#'  '  "  & !0.!,/-/ !0&,; ; #; ; ;1;!.>/> !.=>E EE$)E5:EE/E!+AE0 0 >0  0 ' 0,0!-'+= = = #=  =  =.=!.>/> !.=>E EE$)E5:EE/E!* #'+  (0    %  % +,!,X-X !+!$%)  (0    #  % ,,!0 $)-,2   &  *   1(!.5?/3"&'+ $ $('+ ! "&*(,(,)-'+&**.*."&;@> ?@&@ @ @  @ 3 @ - @ @ %@@@"@%@@@@ !@"#@$$%@&&'@(&)@*'+@,%-@.$/@0(1@23@45@6 7@8(9@: ;@@A@/@H!!1!12   *     3 !-5.5 !- ;?;N;N8A!%           M  9     6  "## . H!./!/0!* BF?C!%#" !""" "  "  " T" @"" " ="""$K%"+"L!+!% 5?    3    ,,!/&*%)## $$ % %()!&" #&&& #& # & &  &&&& & &&&&&&&'&0&T!06B+,+,1559,0:A .2))  /  3  *818!+W,W !!2!23#'15    !    / 40!!3!34#'15    !  /   50!+/6&,B B ,B $B  B,B!-&):>'/'/7;"&#'#6#'"&"&   6  !      .:!1#'"&"&DH    !      B2>!!4!45BF?C    @    = +60!*!%#'5937"%(,'+"(!*$(, )** * !* 3 * 1 *  * * ** **&*%* * * !*$%*& &'**Q+*+*\!+  "       , "!0'+    %     10!* BF?C!%#           T  @     =   "K# + H!-.!08 88!8&+8478818!.#'<@ $"&#'15&TX"& !&&& &: &  & & !& & & &/&Q& &&$%&/&T!/+0+ !/+0+ !/ BF"&*.?C!%LP7;%,( ),, , ,  , T , @,, ,(, , =,, J, 5!," #,$ %,,:-,0,`!*-.#6=(/ )   4  & +0!0D6 1  !+ 5?        3,.!+ ,1  ) ,&!1     %,( ),2,`!,     -F!+BF< <<<*?< <,<!!1!12+3+ !!6!67'->B(,%)!# # <&  #    8(!12!!1!123!0  16!.*/* !1#'5? #:> +1  !  ,    3       8    V  ) "# 2 H!- 6: '     3     .0!,040A0A   .     K-0!+, !0'+59 V  V  V# V 3 V  V  V  V1 V!1'+!  6:   #   3   2 !1'+!  6:   #   3   2 !1&2& !1&2& r