rL i dZgdZddlZddlmZddlmZddlZddlZddl Z ddl Z ddl m Z ddl Z ddl Z ddlZddlmZddlZddlZddlZddlZddlZddlZddlmZd d lmZmZmZmZmZdd l m!Z!dd l"m#Z#e jHe%Z&d Z'eddZ(dZ)dZ*ejVGddZ,dZ-e-ej\dZ/dZ0dZdZ1eddZ2Gdde3Z4ej\dZ5dZ6dZ7dZ8e1d d!Z9e1d"d#Z:e1d$d%Z;d&ZiZ?ejd'jeBd(jeDejeFj)Gd*d+eeHZId[d-ZJej\d.ZKejd/ZMd0d,fd1ZNd\d3ZOeNejd4d5d26ZQeQjejeQjeIZUeUjeQeUjeNe<eUjZWej5ejjDcic]\}}||d7k(r ejneQ||g c}}xZ[e_[dddeUd8re je jd9d:Z^d;Z_d<Z`d2d=d>Zaejd]d?Zbd2d@dAZcejjdBrejjdBeUd7<d2dCdDZfdEZgdFZhdGZidHZjdIZkdJZldKZmdZdddLdMZne&jdNehe&jdOejejdPdQRdSZrejdPdTRdUZsddVltmuZvddWltmwZxddXltmyZzddYl{m|Z}ycc}}w#1swY6xYw)^u An object-oriented plotting library. A procedural interface is provided by the companion pyplot module, which may be imported directly, e.g.:: import matplotlib.pyplot as plt or using ipython:: ipython at your terminal, followed by:: In [1]: %matplotlib In [2]: import matplotlib.pyplot as plt at the ipython shell prompt. For the most part, direct use of the explicit object-oriented library is encouraged when programming; the implicit pyplot interface is primarily for working interactively. The exceptions to this suggestion are the pyplot functions `.pyplot.figure`, `.pyplot.subplot`, `.pyplot.subplots`, and `.pyplot.savefig`, which can greatly simplify scripting. See :ref:`api_interfaces` for an explanation of the tradeoffs between the implicit and explicit interfaces. Modules include: :mod:`matplotlib.axes` The `~.axes.Axes` class. Most pyplot functions are wrappers for `~.axes.Axes` methods. The axes module is the highest level of OO access to the library. :mod:`matplotlib.figure` The `.Figure` class. :mod:`matplotlib.artist` The `.Artist` base class for all classes that draw things. :mod:`matplotlib.lines` The `.Line2D` class for drawing lines and markers. :mod:`matplotlib.patches` Classes for drawing polygons. :mod:`matplotlib.text` The `.Text` and `.Annotation` classes. :mod:`matplotlib.image` The `.AxesImage` and `.FigureImage` classes. :mod:`matplotlib.collections` Classes for efficient drawing of groups of lines or polygons. :mod:`matplotlib.colors` Color specifications and making colormaps. :mod:`matplotlib.cm` Colormaps, and the `.ScalarMappable` mixin class for providing color mapping functionality to other classes. :mod:`matplotlib.ticker` Calculation of tick mark locations and formatting of tick labels. :mod:`matplotlib.backends` A subpackage with modules for various GUI libraries and output formats. The base matplotlib namespace includes: `~matplotlib.rcParams` Default configuration settings; their defaults may be overridden using a :file:`matplotlibrc` file. `~matplotlib.use` Setting the Matplotlib backend. This should be called before any figure is created, because it is not possible to switch between different GUI backends after that. The following environment variables can be used to customize the behavior: :envvar:`MPLBACKEND` This optional variable can be set to choose the Matplotlib backend. See :ref:`what-is-a-backend`. :envvar:`MPLCONFIGDIR` This is the directory used to store user customizations to Matplotlib, as well as some caches to improve performance. If :envvar:`MPLCONFIGDIR` is not defined, :file:`{HOME}/.config/matplotlib` and :file:`{HOME}/.cache/matplotlib` are used on Linux, and :file:`{HOME}/.matplotlib` on other platforms, if they are writable. Otherwise, the Python standard library's `tempfile.gettempdir` is used to find a base directory in which the :file:`matplotlib` subdirectory is created. Matplotlib was initially written by John D. Hunter (1968-2012) and is now developed and maintained by a host of others. Occasionally the internal documentation (python docstrings) will refer to MATLAB®, a registered trademark of The MathWorks, Inc. ) __bibtex__ __version____version_info__ set_loglevelExecutableNotFoundError get_configdir get_cachedir get_data_pathmatplotlib_fnameMatplotlibDeprecationWarningRcParams rc_paramsrc_params_from_filercParamsDefaultrcParams rcParamsOrig defaultParamsrc rcdefaultsrc_file_defaultsrc_file rc_contextuse get_backend interactiveis_interactive colormapsmultivar_colormapsbivar_colormapscolor_sequencesN) namedtuple)MutableMapping) Parameter)Path)parse)_api_versioncbook _docstringrcsetup)r )cyclera@Article{Hunter:2007, Author = {Hunter, J. D.}, Title = {Matplotlib: A 2D graphics environment}, Journal = {Computing in Science \& Engineering}, Volume = {9}, Number = {3}, Pages = {90--95}, abstract = {Matplotlib is a 2D graphics package used for Python for application development, interactive scripting, and publication-quality image generation across user interfaces and operating systems.}, publisher = {IEEE COMPUTER SOC}, year = 2007 } _VersionInfoz)major, minor, micro, releaselevel, serialct|}|jE|j9|j-t |j |j |jddS|j7t |j |j |jd|jS|j]ddddj|jdd}t |j |j |j||jdSt |j |j |jdzd|jS)z Parse a version string to a namedtuple analogous to sys.version_info. See: https://packaging.pypa.io/en/latest/version.html#packaging.version.parse https://docs.python.org/3/library/sys.html#sys.version_info finalr alphabeta candidate)abrr&) parse_versionprepostdevr-majorminormicroget) version_strv releaselevels Y/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/matplotlib/__init__.py_parse_to_version_inforAs k"Auu}AEEMAGGQWWaggwBB  AGGQWWaggwFF   #s1558W5 AGGQWWagg|QUU1XNNAGGQWWaggk7AFFKKcvttjjd}|dz j rO|dz j r<|dz j s) ddl}|j |ddd tj StjS#t$rYtjSwxYw) z/Return the version string used for __version__.z.matplotlib-repoz.gitz .git/shallowr N matplotlibzrelease-branch-semverz node-and-date)root dist_nameversion_scheme local_schemefallback_version) r$__file__resolveparentsexistssetuptools_scm get_versionr(version ImportError)rFrOs r@ _get_versionrSs > ! ! # + +A .D " "**,&&(N*224  !"--&6,!)!1!1 .          s%B B87B8c0eZdZedZedZy) __getattr__ctSN)rSselfs r@z__getattr__.s rBc,t|jSrW)rArrXs r@rZz__getattr__.s+D,<,<=rBN)__name__ __module__ __qualname__propertyrrrBr@rUrUs67K=?rBrUc ddlm}dD]Y\}}tj|}t |j t |ks=t d|d|d|j y)Nr&ft2font))r,z0.10)dateutilz2.7) kiwisolverz1.3.1)numpyz1.23) pyparsingz2.3.1zMatplotlib requires z>=z ; you have )rc importlib import_moduler5rrR)rcmodnameminvermodules r@_check_versionsrns{ @((1 ++ ,}V/D D 4WIRxH**0*<*<)=?@ @ @rBctj}|jtjtjt j ||S)z The first time this function is called, attach a `StreamHandler` using the same format as `logging.basicConfig` to the Matplotlib root logger. Return this handler every time this function is called. )logging StreamHandler setFormatter Formatter BASIC_FORMAT_log addHandler)handlers r@_ensure_handlerrx sB##%G **7+?+?@AOOG NrBctj|jtj|jy)a Configure Matplotlib's logging levels. Matplotlib uses the standard library `logging` framework under the root logger 'matplotlib'. This is a helper function to: - set Matplotlib's root logger level - set the root logger handler's level, creating the handler if it does not exist yet Typically, one should call ``set_loglevel("info")`` or ``set_loglevel("debug")`` to get additional debugging information. Users or applications that are installing their own logging handlers may want to directly manipulate ``logging.getLogger('matplotlib')`` rather than use this function. Parameters ---------- level : {"notset", "debug", "info", "warning", "error", "critical"} The log level of the handler. Notes ----- The first time this function is called, an additional handler is attached to Matplotlib's root handler; this handler is reused every time and this function simply manipulates the logger and handler's level. N)rusetLevelupperrx)levels r@rrs-< MM%++- u{{}-rBctjtSddtjfd}|S)aL Decorator that logs a function's return value, and memoizes that value. After :: @_logged_cached(fmt) def func(): ... the first call to *func* will log its return value at the DEBUG level using %-format string *fmt*, and memoize it; later calls to *func* will directly return that value. NFcLs di|dtjS)NTr`)rudebug)kwargscalledfmtfuncrets r@wrapperz_logged_cached..wrapperPs+..CF JJsC  rB) functoolspartial_logged_cachedwraps)rrrrrs`` @@r@rr=sI |  55 F C__T NrB _ExecInfozexecutable raw_version versionceZdZdZy)rzc Error raised when an executable that Matplotlib optionally depends on can't be found. N)r\r]r^__doc__r`rBr@rr_s  rBrcd.d}|tjjddjdvrt |d|dk(r |ddgd d S|d k(r.implsj ?,,Z..)R9F %( ++a.K#K0G"ww1G'G-Qy ';::ADEET!Wk7; ;)5d1gYf88D>"/&;< <),, C-c$i8dB(( 8&u'@'@'F&GHC)#.C 7 ?)#d)4$ > ?s/(B;;E$C77E $D11 E=EE_MPLHIDEEXECUTABLESrh,z was hiddendvipngz-versionz(?m)^dvipng(?: .*)? (.+)z1.6gswin32)gswin32cgswin64cmgsrz --versionz(.*)9z)Failed to find a Ghostscript installationinkscape)rz --without-gui-VzInkscape ([^ ]*)rmagickr zSoftware\Imagemagick\CurrentBinPath)z convert.exez magick.exez*Failed to find an ImageMagick installationconvertz^Version: ImageMagick (\S*)z 7.0.10-34zYou have ImageMagick z, which is unsupported pdftocairoz-vzpdftocairo version (.*)pdftopsz^pdftops version (.*)T)rz0.9z1.0zYou have pdftops version z7 but the minimum version supported by Matplotlib is 3.0zUnknown executable: )NF)osenvironr<splitrsysplatformwinregKEY_WOW64_32KEYKEY_WOW64_64KEY OpenKeyExHKEY_LOCAL_MACHINEKEY_QUERY_VALUE QueryValueExrr$rNrrrQr9r5 ValueError) namerexecsemessagerbinpathflaghkeypathr2infos r@_get_executable_inforgsD >sCC%k&:;; xXz*,FNN LLG+7  A Q ,fc::  >%g..   ;*, ,   <<7 " GF22F4J4JK ))"55;v55<>JBF"("5"5dI"Fq"I J D9D $Wd 3I '')"9~  |-@BBDT;')GH   { *)' ~5KLN N  \4(*CDD  Y%'>%)+ T\\'''e$ K}U7KK)+DLL>:9:; ; /x899{+  '   Z&(:;;JJ sN: H4 I"+I+ I#I+4 II III( #I++ I87I8ctjjdxs tt j dz S)z Return the XDG configuration directory, according to the XDG base directory spec: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html XDG_CONFIG_HOMEz.configrrr<rr$homer`rBr@_get_xdg_config_dirrs- ::>>+ , LDIIK)4K0LLrBctjjdxs tt j dz S)z Return the XDG cache directory, according to the XDG base directory spec: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html XDG_CACHE_HOMEz.cacherr`rBr@_get_xdg_cache_dirrs- ::>>* + Js499;3I/JJrBcZtjjd}|r t|}nHtj j drt|d}ntjdz }|j} |jddtjt|tjr|jr t|Stjd| t#j$d }|tjd<t'j(t*j,|tjd |||S#t $r!}tjd||Yd}~d}~wwxYw#t $r}t!d |d |d}~wwxYw)N MPLCONFIGDIR)linuxfreebsdrEz .matplotlibT)rMexist_okz%s is not a writable directoryzmkdir -p failed for path %s: %sz matplotlib-)prefixzhMatplotlib requires access to a writable cache directory, but there was an issue with the default path (zt), and a temporary directory could not be created; set the MPLCONFIGDIR environment variable to a writable directorya$Matplotlib created a temporary cache directory at %s because there was an issue with the default path (%s); it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.)rrr<r$rr startswithrrLmkdiraccessrW_OKis_dirruwarningrtempfilemkdtempatexitregistershutilrmtree)xdg_base_getter configdirexctmpdirs r@_get_config_or_cache_dirr sj ~.IO  !5 6*L9 IIK-/ !!#IBt4 99S^RWW -)2B2B2Dy> ! 5yA:!!7"(BJJ~ OOFMM6*LL S   M1 H 6 3GGH :33<+>/ 017:  ::s0E9F  F (FF  F*F%%F*z CONFIGDIR=%sc ttS)a1 Return the string path of the configuration directory. The directory is chosen as follows: 1. If the MPLCONFIGDIR environment variable is supplied, choose that. 2. On Linux, follow the XDG specification and look first in ``$XDG_CONFIG_HOME``, if defined, or ``$HOME/.config``. On other platforms, choose ``$HOME/.matplotlib``. 3. If the chosen directory exists and is writable, use that as the configuration directory. 4. Else, create a temporary directory, and use it as the configuration directory. )rrr`rBr@rr3s $$7 88rBz CACHEDIR=%sc ttS)z Return the string path of the cache directory. The procedure used to find the directory is the same as for `get_configdir`, except using ``$XDG_CACHE_HOME``/``$HOME/.cache`` instead. )rrr`rBr@rrFs $$6 77rBzmatplotlib data path: %scPtttjdS)z#Return the path to Matplotlib data.zmpl-data)rr$rK with_namer`rBr@r r Qs tH~'' 3 44rBcd}|D]E}tjj|s#tjj|rC|cSt d)a Get the location of the config file. The file location is determined in the following order - ``$PWD/matplotlibrc`` - ``$MATPLOTLIBRC`` if it is not a directory - ``$MATPLOTLIBRC/matplotlibrc`` - ``$MPLCONFIGDIR/matplotlibrc`` - On Linux, - ``$XDG_CONFIG_HOME/matplotlib/matplotlibrc`` (if ``$XDG_CONFIG_HOME`` is defined) - or ``$HOME/.config/matplotlib/matplotlibrc`` (if ``$XDG_CONFIG_HOME`` is not defined) - On other platforms, - ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined - Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always exist. c3NKd tjd}|tjj|dtjjt dtjjt dy#t$rY`wxYww)N matplotlibrc MATPLOTLIBRC)rrrrKeyErrorrr )rs r@gen_candidatesz(matplotlib_fname..gen_candidatesls  =::n5L '',,|^< <ggll=?N;;ggll=?N;;    s(B%BA;B% B"B%!B""B%zCCould not find matplotlibrc file; your Matplotlib install is broken)rrrNisdir RuntimeError)rfnames r@r r WsS*<  ! 77>>% u)=L + ,,rB z- {})keyc|eZdZdZej ZdZdZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZy)r a, A dict-like key-value store for config parameters, including validation. Validating functions are defined and associated with rc parameters in :mod:`matplotlib.rcsetup`. The list of rcParams is: %s See Also -------- :ref:`customizing-with-matplotlibrc-files` c(|j|i|yrW)update)rYrrs r@__init__zRcParams.__init__s T$V$rBc2tj|||y)a Directly write data bypassing deprecation and validation logic. Notes ----- As end user or downstream library you almost always should use ``rcParams[key] = val`` and not ``_set()``. There are only very few special cases that need direct data access. These cases previously used ``dict.__setitem__(rcParams, key, val)``, which is now deprecated and replaced by ``rcParams._set(key, val)``. Even though private, we guarantee API stability for ``rcParams._set``, i.e. it is subject to Matplotlib's API and deprecation policy. :meta public: N)dict __setitem__)rYrvals r@_setz RcParams._sets$ sC(rBc.tj||S)a Directly read data bypassing deprecation, backend and validation logic. Notes ----- As end user or downstream library you almost always should use ``val = rcParams[key]`` and not ``_get()``. There are only very few special cases that need direct data access. These cases previously used ``dict.__getitem__(rcParams, key, val)``, which is now deprecated and replaced by ``rcParams._get(key)``. Even though private, we guarantee API stability for ``rcParams._get``, i.e. it is subject to Matplotlib's API and deprecation policy. :meta public: )r  __getitem__)rYrs r@_getz RcParams._gets&c**rBczt|trtj|}tj ||y)a Directly update the data from *other_params*, bypassing deprecation, backend and validation logic on both sides. This ``rcParams._update_raw(params)`` replaces the previous pattern ``dict.update(rcParams, params)``. Parameters ---------- other_params : dict or `.RcParams` The input mapping from which to update. N) isinstancer r itemsr)rY other_paramss r@ _update_rawzRcParams._update_raws* lH -::l3L D,'rBcNtj|dtjy)a Ensure that a "backend" entry exists. Normally, the default matplotlibrc file contains *no* entry for "backend" (the corresponding line starts with ##, not #; we fill in _auto_backend_sentinel in that case. However, packagers can set a different default backend (resulting in a normal `#backend: foo` line) in which case we should *not* fill in _auto_backend_sentinel. backendN)r  setdefaultr+_auto_backend_sentinelrXs r@_ensure_has_backendzRcParams._ensure_has_backends i)G)GHrBc@ |tvr2t|\}}}}tj||d||}||}nx|tvr&|$t|\}tj||dnJ|tvr&t|\}}tj||d|y|dk(r|t j urd|vry |j||}|j||y#t$r}td|d|dd}~wwxYw#t$r} t|d| d} ~ wwxYw)Nrcparamrobj_type alternative)rrrzKey z: zQ is not a valid rc parameter (see rcParams.keys() for a list of valid parameters)) _deprecated_mapr'warn_deprecated_deprecated_remain_as_none_deprecated_ignore_mapr+rvalidaterr r) rYrr rQalt_keyalt_val inverse_altcvalveerrs r@r zRcParams.__setitem__sM 9o%9H9M6';$$# wPcl22s5c:$$W3K..#9##> $$# wP !'888 D( ?)t}}S)#. IIc4  ? 4uBrd!34$> ? 9%./058 9 9sBBDD5C D C=&C88C==D D DDc|tvr>t|\}}}}tj||d|||j|S|tvr:t|\}}tj||d||r|j|SdS|dk(rc|t j durH|j|}|tjur%ddl m }|jtj|j|S)Nrrrrr )pyplot) rr'r rr"globalsr<r+rrEr+switch_backend)rYrrQr$r%r&r plts r@rzRcParams.__getitem__ s / !5DS5I 2GWg{  cI7 Ltyy12 2 * *5c: GW  cI7 L)0499W% :d :I $')-- *C"C))C.Cg4444""7#A#AByy~rBcP|jd}|tjurdS|S)zAGet the requested backend, if any, without triggering resolution.rN)rr+r)rYrs r@_get_backend_or_nonezRcParams._get_backend_or_none$s())I&'"@"@@tMgMrBc@|jj}t|dz}tj5t j t|dd|z jd}ddddd|zzj}|d|dS#1swY(xYw)Nr&P)indentwidthrr()) __class__r\lenr''suppress_matplotlib_deprecation_warningpprintpformatr rr)rY class_namer3 repr_split repr_indenteds r@__repr__zRcParams.__repr__)s^^,, Z1$  9 9 ; GT 1.06k;;@5;  Gf ,22:> Q}oQ//  G Gs 4BBc zdjtdjt|j S)Nrz{0[0]}: {0[1]})rmapformatsortedrrXs r@__str__zRcParams.__str__2s*yy-44fTZZ\6JKLLrBc#Ktj5ttj |Ed{dddy7 #1swYyxYww)zYield sorted list of keys.N)r'r9rCr __iter__rXs r@rFzRcParams.__iter__5sF  9 9 ; 3dmmD12 2 2 3 3 2 3 3s+A"A AA  AA  AAc,tj|SrW)r __len__rXs r@rHzRcParams.__len__:s||D!!rBcrtj|tfd|jDS)a Return the subset of this RcParams dictionary whose keys match, using :func:`re.search`, the given ``pattern``. .. note:: Changes to the returned dictionary are *not* propagated to the parent RcParams dictionary. c3NK|]\}}j|r||fywrW)r).0rvalue pattern_res r@ z$RcParams.find_all..Is/3&C%,,S1e 3s"%)rcompiler r)rYpatternrMs @r@find_allzRcParams.find_all=s3ZZ( 3*.**,33 3rBcjt}|D]#}|j||j|%|S)zCopy this RcParams instance.)r r r)rYrccopyks r@copyz RcParams.copyMs3 )A KK499Q< ( ) rBN)r\r]r^rr+ _validatorsr#rr rrrr rr0r?rDrFrHrQrUr`rBr@r r s] ""H%)(+*(" I9<.N 0M3 "3 rBr Fc*tt|S)zDConstruct a `RcParams` instance from the default Matplotlib rc file.)rr  fail_on_errors r@r r Us /1= AArBc ddl}ddl}|j |j S#t$rtjdYywxYw)Nr zCould not import certifi.)cafile)certifirRrursslcreate_default_contextwhere)r\r]s r@_get_ssl_contextr`ZsJ  % %W]]_ % ==  ./s*A  A c#Kt|trh|jdrWddl}t }|t j d|jj||5}d|Ddddytjj|}t|d5}|dddy#1swYyxYw#1swYyxYww)N)zhttp://zhttps://zftp://zfile:r z6Could not get certifi ssl context, https may not work.)contextc3>K|]}|jdyw)utf-8N)decode)rKlines r@rNz$_open_file_or_url..ps6D4;;w'6srd)encoding) rrrurllib.requestr`rurrequesturlopenrr expanduseropen)rurllibssl_ctxfs r@_open_file_or_urlrpes5#  !KL"$ ? JJH ^^ # #E7 # ; 7q6A6 6 7 7""5) %' * aG    7 7  s6A$C & B525C 'C, C 5B>:C C C c|SrWr`)xs r@rZrZws!rBc ddl}i}t|5} t|dD]\}}||}tj|}|s&|j dd} t | dk7r(tjd|||jdn| \} } | j} | j} | jdr| jdr| dd } | |vr'tjd |||jd| ||f|| < dddt} |jD]\} \} }}| t j"vr|r| | | <$ | | | <+| t&vr't&| \}}t)j*|| |d dZd|j,vrdnd|j,}tjdt/| |||jd|| S#t$rtjd |wxYw#1swYxYw#t$$r3} tjd |||jd| Yd} ~ d} ~ wwxYw)aB Construct a `RcParams` instance from file *fname*. Unlike `rc_params_from_file`, the configuration class only contains the parameters specified in the file (i.e. default values are not filled in). Parameters ---------- fname : path-like The loaded file. transform : callable, default: the identity function A function called on each individual line of the file to transform it, before further parsing. fail_on_error : bool, default: False Whether invalid entries should result in an exception or a warning. r Nr&:rDz&Missing colon in file %r, line %d (%r)r"z&Duplicate key in file %r, line %d (%r)z-Cannot decode configuration file %r as utf-8.z&Bad value in file %r, line %d (%r): %srz Please update your matplotlibrc.)rrraddendumz.postmainr>a Bad key %(key)s in file %(fname)s, line %(line_no)s (%(line)r) You probably need to get an updated matplotlibrc file from https://github.com/matplotlib/matplotlib/blob/%(version)s/lib/matplotlib/mpl-data/matplotlibrc or from the matplotlib source distribution)rrline_norfrQ)rErp enumerater)_strip_commentrr8rurrstripstriprendswithUnicodeDecodeErrorr rr+rV Exceptionr"r'r rr )r transformrYmplrc_tempfdryrf strippedlinetuprr configrrQr$s r@_rc_params_in_filerwsi"G 5 !R !*2q!1 4  $33D9 #"((a0s8q=LL!I!&T1BDSiikiik>>#&3<<+<a)C'>LL!I!&T1BD #T73 % 44ZF%,]]_H! !c4 '%% %!s I"%F3K* *5c: GW  cw; = ")COO!;v01  LL. #UG#';;t#4gG  H)H6 ME"  LLH  +F!ILL!I!&T1BCIIIs5HC;G"H"!HHH I(I  ITcDt||}|s|Stj5tit|}ddddj dr(t jddj |dt jd||S#1swY]xYw)a Construct a `RcParams` from file *fname*. Parameters ---------- fname : str or path-like A file with Matplotlib rc settings. fail_on_error : bool If True, raise an error when the parser fails to convert a parameter. use_default_template : bool If True, initialize with default parameters before updating with those in the given file. If False, the configuration class only contains the parameters specified in the file. (Useful for updating dicts.) rXNrhztext.latex.preamblea  ***************************************************************** You have the following UNSUPPORTED LaTeX preamble customizations: %s Please do not ask for support with these customizations active. ***************************************************************** rzloaded rc file %s) rr'r9r rrrurr)rrYuse_default_templateconfig_from_filers r@rrs*%}M  5 5 7CA_A0@ABC wwv+,-   YYv+,-  / JJ"E* MCCs BBrc2|jdr|ddS|S)N#r&)r)rfs r@rZrZsts';48rB)rrYrzaxes.formatter.use_localerhc dddddddd}t|tr|f}|D]@}|jD]+\}}|j|xs|}|d |} |t|<-By#t $r}t d |d |d |d |d}~wwxYw)a Set the current `.rcParams`. *group* is the grouping for the rc, e.g., for ``lines.linewidth`` the group is ``lines``, for ``axes.facecolor``, the group is ``axes``, and so on. Group may also be a list or tuple of group names, e.g., (*xtick*, *ytick*). *kwargs* is a dictionary attribute name/value pairs, e.g.,:: rc('lines', linewidth=2, color='r') sets the current `.rcParams` and is equivalent to:: rcParams['lines.linewidth'] = 2 rcParams['lines.color'] = 'r' The following aliases are available to save typing for interactive users: ===== ================= Alias Property ===== ================= 'lw' 'linewidth' 'ls' 'linestyle' 'c' 'color' 'fc' 'facecolor' 'ec' 'edgecolor' 'mew' 'markeredgewidth' 'aa' 'antialiased' ===== ================= Thus you could abbreviate the above call as:: rc('lines', lw=2, c='r') Note you can use python's kwargs dictionary facility to store dictionaries of default parameters. e.g., you can customize the font rc as follows:: font = {'family' : 'monospace', 'weight' : 'bold', 'size' : 'larger'} rc('font', **font) # pass in the font dict as kwargs This enables you to easily switch between several configurations. Use ``matplotlib.style.use('default')`` or :func:`~matplotlib.rcdefaults` to restore the default `.rcParams` after changes. Notes ----- Similar functionality is available by using the normal dict interface, i.e. ``rcParams.update({"lines.linewidth": 2, ...})`` (but ``rcParams.update`` does not support abbreviations or grouping). linewidth linestylecolor facecolor edgecolormarkeredgewidth antialiased)lwlscfcecmewaa.zUnrecognized key "z " for group "z " and name "ruN)rrrr<rr) rraliasesgrTr>rrr)s r@rrsl  G% HLLN HDAq;;q>&QDCq-C H !  HH  H03Q >?DGH Hs A$$ B-BBc tj5ddlm}tj tj tjDcic] \}}||vr||c}}dddycc}}w#1swYyxYw)a Restore the `.rcParams` from Matplotlib's internal default style. Style-blacklisted `.rcParams` (defined in ``matplotlib.style.core.STYLE_BLACKLIST``) are not updated. See Also -------- matplotlib.rc_file_defaults Restore the `.rcParams` from the rc file originally loaded by Matplotlib. matplotlib.style.use Use a specific style file. Call ``style.use('default')`` to restore the default style. r&STYLE_BLACKLISTN) r'r9 style.corerrclearrrr)rrTr>s r@rrMsu$  5 5 77//*?*?*A6$!Q_4A6 777677sAA>A8 'A>8A>>Bc tj5ddlm}tj t Dcic]}||vr |t |c}dddycc}w#1swYyxYw)z Restore the `.rcParams` from the original rc file loaded by Matplotlib. Style-blacklisted `.rcParams` (defined in ``matplotlib.style.core.STYLE_BLACKLIST``) are not updated. r&rN)r'r9rrrrr)rrTs r@rrfsc  5 5 77/\6_4LO+6 777677sAA AAA&rc tj5ddlm}t ||}t j |Dcic] }||vr|||c}dddycc}w#1swYyxYw)a Update `.rcParams` from file. Style-blacklisted `.rcParams` (defined in ``matplotlib.style.core.STYLE_BLACKLIST``) are not updated. Parameters ---------- fname : str or path-like A file with Matplotlib rc settings. use_default_template : bool If True, initialize with default parameters before updating with those in the given file. If False, the current configuration persists and only the parameters specified in the file are updated. r&rrN)r'r9rrrrr)rrr rc_from_filerTs r@rruss&  5 5 77/* (<> \6_4LO+6 7 776 77s'A"A A"A""A+c#Kttj}|d= |r t||rtj |dtj |y#tj |wxYww)a{ Return a context manager for temporarily changing rcParams. The :rc:`backend` will not be reset by the context manager. rcParams changed both through the context manager invocation and in the body of the context will be reset on context exit. Parameters ---------- rc : dict The rcParams to temporarily set. fname : str or path-like A file with Matplotlib rc settings. If both *fname* and *rc* are given, settings from *rc* take precedence. See Also -------- :ref:`customizing-with-matplotlibrc-files` Examples -------- Passing explicit values via a dict:: with mpl.rc_context({'interactive': False}): fig, ax = plt.subplots() ax.plot(range(3), range(3)) fig.savefig('example.png') plt.close(fig) Loading settings from a file:: with mpl.rc_context(fname='print.rc'): plt.plot(x, y) # uses 'print.rc' Setting in the context body:: with mpl.rc_context(): # will be reset mpl.rcParams['lines.linewidth'] = 5 plt.plot(x, y) rN)r rrUrrr)rrorigs r@rrs]Z   D Y#  EN OOB  T"T"s!A<(A" A<"A99A<)forcectj|}tj|k(rn=tj j d}| |j|n |td<dtd<y#t$r|rYwxYw)a Select the backend used for rendering and GUI integration. If pyplot is already imported, `~matplotlib.pyplot.switch_backend` is used and if the new backend is different than the current backend, all Figures will be closed. Parameters ---------- backend : str The backend to switch to. This can either be one of the standard backend names, which are case-insensitive: - interactive backends: GTK3Agg, GTK3Cairo, GTK4Agg, GTK4Cairo, MacOSX, nbAgg, notebook, QtAgg, QtCairo, TkAgg, TkCairo, WebAgg, WX, WXAgg, WXCairo, Qt5Agg, Qt5Cairo - non-interactive backends: agg, cairo, pdf, pgf, ps, svg, template or a string of the form: ``module://my.module.name``. notebook is a synonym for nbAgg. Switching to an interactive backend is not possible if an unrelated event loop has already been started (e.g., switching to GTK3Agg if a TkAgg window has already been opened). Switching to a non-interactive backend is always possible. force : bool, default: True If True (the default), raise an `ImportError` if the backend cannot be set up (either because it fails to import, or because an incompatible GUI interactive framework is already running); if False, silently ignore the failure. See Also -------- :ref:`backends` matplotlib.get_backend matplotlib.pyplot.switch_backend zmatplotlib.pyplotNrFbackend_fallback) r+validate_backendrr0rmodulesr<r-rR)rrrr.s r@rrsV  # #G ,D$$&$. kkoo12 ? ""4(#*HY $)H    sA55 BB MPLBACKEND) auto_selectcl|r tdStjd}|tjury|S)aE Return the name of the current backend. Parameters ---------- auto_select : bool, default: True Whether to trigger backend resolution if no backend has been selected so far. If True, this ensures that a valid backend is returned. If False, this returns None if no backend has been selected so far. .. versionadded:: 3.10 .. admonition:: Provisional The *auto_select* flag is provisional. It may be changed or removed without prior warning. See Also -------- matplotlib.use rN)rrr+r)rrs r@rrs6. ""-- * g44 4NrBc|td<y)zU Set whether to redraw after every plotting command (e.g. `.pyplot.xlabel`). rNr)r4s r@rr7s H]rBctdS)z Return whether to redraw after every plotting command. .. note:: This function is only intended for use in backends. End users should use `.pyplot.isinteractive` instead. rrr`rBr@rr>s M ""rBc||St|S)zS If *val* is None, return ``mpl.rcParams[rc_name]``, otherwise return val. r)r rc_names r@ _val_or_rcrJs/38x'88rBcd}ddlm}|j|k7s|jdk7r4tj d||j|jdk(rdndyy)Nz2.6.1r rblocalaMatplotlib is not built with the correct FreeType version to run tests. Rebuild without setting system-freetype=true in Meson setup options. Expect many image comparison failures below. Expected freetype version %s. Found freetype version %s. Freetype build type is %slocal.rhznot )rErc__freetype_version____freetype_build_type__rur)LOCAL_FREETYPE_VERSIONrcs r@ _init_testsrQsa%"$$(>>  + +w 6  . #  ( (11W.inner..s.Oryr/B.Oslabel) rAr)rrbind argumentsr<rrtuplerr)axrrrrTr>bound auto_labelk1rnew_args new_kwargsargs_and_kwargsrrnew_sigr varargs_namevarkwargs_names ` r@innerz_preprocess_data..inners <NU,,d3N>D\\^LTQ1e--a00LN N  R1$1&1oo))+67))+6 OO))+ )24);EOOA& <::\\ =U__= = 7/9"1##K0*#>Jw X,,,5Ms F*)rr_preprocess_datar signaturelistrvalueskindr#VAR_POSITIONALr VAR_KEYWORDappend KEYWORD_ONLYinsertr issupersetr\rrr __signature__) rrrsig arg_namesparamsp data_paramrrrrs ``` @@@r@rrsN |  '[B B   D !CLNI #..'') *F % 66Y-- -66L VVy,, ,VVN   QVV $ %69#9#94HJ b*% j!kkVk,G!" I Y< " "=#6B 7>6  F4=="3 56 I  +":4 ?& 1 34 :__T"---B"%--?EM!E LrBzinteractive is %szplatform is %sz3.10z"matplotlib.cbook.sanitize_sequence)rc,tj|SrW)r)rrs r@rrs  " "4 ((rBz#matplotlib.rcsetup.validate_backendc,tj|SrW)r+r)ss r@rr!s  # #A &&rB) _colormaps)_multivar_colormaps)_bivar_colormaps)_color_sequencesrW)F)FT)NN)~r__all__r collectionsr!collections.abcr" contextlibrrirr#localerprpathlibr$r:rrrrrpackaging.versionr%r5rhr'r(r)r*r+matplotlib._apir matplotlib.rcsetupr, getLoggerr\rurr-rArScaching_module_getattrrUrncacherxrrrFileNotFoundErrorrrrrrrrr r rr"r! SubstitutionrrArBrCrVrlowerr r r r`contextmanagerrprr_get_data_pathrr_hardcoded_defaultsrrrUrr9rrr setlocaleLC_ALLrrrrrrrr<rrrrrrrrrrr deprecatedrr matplotlib.cmrrrrrrmatplotlib.colorsrr)r validators00r@rseN D"*    4988%w"  .EG L04??? @&    .D> {$D E  /  L:L:^MK&R9 9$ 88*+5,5 *,^ IIc&--(;(;!KLM~tDB  >> ")45JZ!H%E(E  G778##% :_%'(8(:;<}} 1T113;&11779 -; C  1Aw--s# -;;MG); '(FV]]B'IHX72 7,076 5#5#pF)R::>>,**..6HY $B  #9J( * )IXk4k\  01 S\\*%IJ)K)%JK'L' 2C=Ai-;;;s$O$#O% O$O$$O.