Files
intellecton/venv/lib/python3.12/site-packages/matplotlib/__pycache__/animation.cpython-312.pyc
T

713 lines
78 KiB
Plaintext
Raw Normal View History

Ë
†Rj ãó´ddlZddlZddlZddlmZmZddlZddlZddlm Z ddl
Z
ddl Z ddl Z ddl
mZddlZddlZddlZddlmZddlZddlmZmZmZmZddlmZmZddlmZ ejBe"«Z#e jHdk(r e jJndZ&d „Z'Gd
d «Z(e(«Z)Gd d
ejT«Z+Gdde+«Z,Gdde,«Z-e)j]d«Gdde+««Z/Gdd«Z0e)j]d«Gdde0e,««Z1e)j]d«Gdde0e-««Z2Gdd«Z3e)j]d«Gd „d!e3e,««Z4e)j]d"«Gd#„d$e3e-««Z5d%„Z6d&„Z7e)j]d'«Gd(„d)e-««Z8Gd*„d+«Z9Gd,„d-e9«Z:Gd.„d/e:«Z;Gd0„d1e:«Z<d2„Z=y)3éN)ÚBytesIOÚ
TextIOWrapper)ÚPath)ÚTemporaryDirectory)ÚImage)ÚDISPLAY_TEMPLATEÚINCLUDED_FRAMESÚ
JS_INCLUDEÚ
STYLE_INCLUDE)Ú_apiÚcbookÚwin32cóŒd}t||z|z «|z|z }t||z|z «|z|z }||||«||||«fS)a,
Compute figure size so that pixels are a multiple of n.
Parameters
----------
w, h : float
Size in inches.
dpi : float
The dpi.
n : int
The target multiple.
Returns
-------
wnew, hnew : float
The new figure size in inches.
cóžt||z«|zdk7r¸ttj|tj«|z«|zdk(r&tj|tj«}|Sttj|tj «|z«|zdk(r%tj|tj «}|S)Nr)ÚintÚnpÚ nextafterÚinf)ÚdpiÚns úW/home/antigravity/intellecton/venv/lib/python3.12/site-packages/matplotlib/animation.pyÚcorrect_roundoffz*adjusted_figsize.<locals>.correct_roundoff7Ü ˆq‰u‹:˜‰>˜ Ü”2—<< ¤2§6¡6Ó*¨3Ñ/°!Ñ3°qÒ—L‘L ¤B§F¡FÓ+ðˆô”R—\‘\ !¤b§f¡f -¨cÑ2°QÑ6¸!Ò—L‘L ¤R§V¡V GÓ,؈ó)r)ÚhrrrÚwnewÚhnews rÚadjusted_figsizer s_ò.ô ˆq3‰w˜‰{Ó ˜aÑ  #Ñ %€DÜ ˆq3‰w˜‰{Ó ˜aÑ  #Ñ %€DÙ ˜D #  )Ñ+;¸DÀ#ÀqÓ+IÐ Ircó4eZdZdZdZdZdZdZdZdZ y) ÚMovieWriterRegistryz<Registry of available writer classes by human readable name.có"t«|_y©N)ÚdictÚ _registered©Úselfs rÚ__init__zMovieWriterRegistry.__init__Gs Ü6ˆÕrcóˆˆfd}|S)
Decorator for registering a class under a name.
Example use::
@registry.register(name)
class Foo:
pass
có&|j<|Sr#)r%)Ú
writer_clsÚnamer's €€rÚwrapperz-MovieWriterRegistry.register.<locals>.wrapperTsø€Ø%/ˆD× Ñ ˜ Ð r©)r'r,r-s`` rÚregisterzMovieWriterRegistry.registerJsù€õ ðˆrcó` |j|}|j«S#t$rYywxYw)
Check if given writer is available by name.
Parameters
----------
name : str
Returns
-------
bool
F)r%ÚKeyErrorÚ isAvailable)r'r,Úclss rÚ is_availablez MovieWriterRegistry.is_availableYs:ð Ø×" (ˆÓ Ð øôò Ùð ús !¡ -¬-c#óZK|jD]}|j|«sŒ|Œy­w)z-Iterate over names of available writer class.N)r%r4©r'r,s rÚ__iter__zMovieWriterRegistry.__iter__ks.èø€à× ˆDØ× Ñ  Õ
ñ ùs!+¤+có
g|¢S)z%Get a list of available MovieWriters.r.r&s rÚlistzMovieWriterRegistry.listqs àˆwˆrcó`|j|«r|j|Std|d«)z,Get an available writer class from its name.zRequested MovieWriter (z) not available)r4r%Ú RuntimeErrorr6s rÚ __getitem__zMovieWriterRegistry.__getitem__us6à × Ñ ˜ ×#  Ð4°T°F¸KrN)
Ú__name__Ú
__module__Ú __qualname__Ú__doc__r(r/r4r7r9r<r.rrr!r!Ds$Ù
ò!ò$ò óLrr!cóÀeZdZdZd
dZej d d«Zed«Z dZ
ej d«Z ej d«Z e
jd „«Zy) ÚAbstractMovieWriteraœ
Abstract base class for writing movies, providing a way to grab frames by
calling `~AbstractMovieWriter.grab_frame`.
`setup` is called to start the process and `finish` is called afterwards.
`saving` is provided as a context manager to facilitate this process as ::
with moviewriter.saving(fig, outfile='myfile.mp4', dpi=100):
# Iterate over frames
moviewriter.grab_frame(**savefig_kwargs)
The use of the context manager ensures that `setup` and `finish` are
performed as necessary.
An instance of a concrete subclass of this class can be given as the
``writer`` argument of `Animation.save()`.
Ncó”||_||ni|_tj|d«|_tj|d«|_y)Nzanimation.codecúanimation.bitrate)ÚfpsÚmetadataÚmplÚ
_val_or_rcÚcodecÚbitrate)r'rErFrIrJs rr(zAbstractMovieWriter.__init__s=؈ŒØ$,Ð$8™¸bˆŒ
Ü—^^ EÐ+<Ó=ˆŒ
Ü—~~ gÐ/BÓCˆ rcó¨t|«jjd¬«||_||_||jj
}||_y)a¿
Setup for writing the movie file.
Parameters
----------
fig : `~matplotlib.figure.Figure`
The figure object that contains the information for frames.
outfile : str
The filename of the resulting movie file.
dpi : float, default: ``fig.dpi``
The DPI (or resolution) for the file. This controls the size
in pixels of the resulting movie file.
ÚstrictN)rÚparentÚresolveÚoutfileÚfigr)r'rQrPrs rÚsetupzAbstractMovieWriter.setup˜sFô
ˆW
×Ñ×$¨DЈŒ ؈ŒØ ˆ;Ø—(‘(—,‘,ˆC؈rcóœ|jj«\}}t||jz«t||jz«fS)z7A tuple ``(width, height)`` in pixels of a movie frame.)rQÚget_size_inchesrr)r'rrs rÚ
frame_sizezAbstractMovieWriter.frame_size¯s?ðx‰x×)‰ˆˆ1t—xx ¤# a¨$¯(©(¡lÓ"3Ð3rcóy)z
Whether this writer supports transparency.
Writers may consult output file type and codec to determine this at runtime.
Fr.r&s rÚ_supports_transparencyz*AbstractMovieWriter._supports_transparencyµsð rc óy)a=
Grab the image information from the figure and save as a movie frame.
All keyword arguments in *savefig_kwargs* are passed on to the
`~.Figure.savefig` call that saves the figure. However, several
keyword arguments that are supported by `~.Figure.savefig` may not be
passed as they are controlled by the MovieWriter:
- *dpi*, *bbox_inches*: These may not be passed because each frame of the
animation much be exactly the same size in pixels.
- *format*: This is controlled by the MovieWriter.
Nr.©r'Úsavefig_kwargss rÚ
grab_framezAbstractMovieWriter.grab_frame½órcóy)ú,Finish any processing for writing the movie.Nr.r&s rÚfinishzAbstractMovieWriter.finishÌr\rc/ó@Ktjddk(rtjd«|j|||g|¢­i|¤Žtj
ddi«5 ||j
« ddd«y#|j
«wxYw#1swYyxYw­w)z•
Context manager to facilitate writing the movie file.
``*args, **kw`` are any parameters that should be passed to `setup`.
ú savefig.bboxÚtightzkDisabling savefig.bbox = 'tight', as it may cause frame size to vary, which is inappropriate for animation.N)rGÚrcParamsÚ_logÚinforRÚ
rc_contextr_)r'rQrPrÚargsÚkwargss rÚsavingzAbstractMovieWriter.savingÐsèø€ô <‰<˜Ñ '¨7Ò I‰Ið
ˆ
3˜ Ð6 6¨vÒ
^‰^˜^¨TÐ
 ð
Ø
à
÷  ð øð
ú÷  ð üs6ABÁBÁA=Á#BÁ4 BÁ=BÂBÂBÂB)éNNNr#)r=r>r?r@r(ÚabcÚabstractmethodrRÚpropertyrUrWr[r_Ú
contextlibÚcontextmanagerrir.rrrBrBñó$Dð  ×Ñòóðð,ñð
ð ×Ññ  óð  ð ×Ññð×ÑñóñrrBcóxeZdZdZdgZ d ˆfd„ ZdZd
ˆfd„ ZdZdZ dZ
d „Z e d
«Z
e d «ZˆxZS)Ú MovieWriteraß
Base class for writing movies.
This is a base class for MovieWriter subclasses that write a movie frame
data to a pipe. You cannot instantiate this class directly.
See examples for how to use its subclasses.
Attributes
----------
frame_format : str
The format used in writing frame data, defaults to 'rgba'.
fig : `~matplotlib.figure.Figure`
The figure to capture data from.
This must be provided by the subclasses.
Úrgbacóšt|«tur td«t|||||¬«|j
d|_||_y)a@
Parameters
----------
fps : int, default: 5
Movie frame rate (per second).
codec : str or None, default: :rc:`animation.codec`
The codec to use.
bitrate : int, default: :rc:`animation.bitrate`
The bitrate of the movie, in kilobits per second. Higher values
means higher quality movies, but increase the file size. A value
of -1 lets the underlying movie encoder select the bitrate.
extra_args : list of str or None, optional
Extra command-line arguments passed to the underlying movie encoder. These
arguments are passed last to the encoder, just before the filename. The
default, None, means to use :rc:`animation.[name-of-encoder]_args` for the
builtin writers.
metadata : dict[str, str], default: {}
A dictionary of keys and values for metadata to include in the
output file. Some keys that may be of use include:
title, artist, genre, subject, copyright, srcform, comment.
zNMovieWriter cannot be instantiated directly. Please use one of its subclasses.)rErFrIrJrN)ÚtyperqÚ TypeErrorÚsuperr(Úsupported_formatsÚ frame_formatÚ
extra_args)r'rErIrJryrFÚ __class__s €rr(zMovieWriter.__init__s\ø€ô. ‹:œÑ
ð
 јS¨8¸5Ø!(ð ô ×2°1ÑÔØrcó”|jdk(ry|jj«\}}t|||jd«\}}||f||fk7rU|jj ||d¬«t jd||||«n|jj«\}}t
jdg|j¢­Ž||fS)h264éT)Úforwardz?figure size in inches has been adjusted from %s x %s to %s x %szframe size in pixels is %s x %s)
rIrQrTrrÚset_size_inchesrdreÚdebugrU)r'ÚwoÚhorrs rÚ_adjust_frame_sizezMovieWriter._adjust_frame_size%Ø :‰:˜Ò Ø—X‘X×/‰FˆBÜ# B¨¨D¯H©H°aÓ8‰DˆAˆqØBˆx˜A˜q˜6ÒרA°tЗ ‘ ð4Ø57¸¸QÀõCð—8‘8×-‰DˆAˆqÜ
ÐG°t·±Ó!ˆtˆ rcó„t||||¬«|j«\|_|_|j «y©N)r)rvrRÚ_wÚ_hÚ_run©r'rQrPrrzs €rrRzMovieWriter.setup2s7ø€ä

c˜ˆ
Ô׈Œð
rcóÜ|j«}tjdtj|««t
j }t j||||t¬«|_ y)Nz%MovieWriter._run: running command: %s)ÚstdinÚstdoutÚstderrÚ
creationflags)
Ú_argsrdrer
Ú_pformat_subprocessÚ
subprocessÚPIPEÚPopenÚsubprocess_creation_flagsÚ_proc)r'Úcommandrs rrˆzMovieWriter._run:sSð—*‘*“,ˆÜ ‰ Ð×+¨GÓˆÜ× ˜4¨°TÜ
rcó¦|jj«\}}tt|««j «}tt|««j «}|rKt
j
|jjrtjntjd|«|rKt
j
|jjrtjntjd|«|jjr@tj|jj|jj||«y)r^zMovieWriter stdout:
%szMovieWriter stderr:
%sN)r•Ú communicaterrÚreadrdÚlogÚ
returncodeÚloggingÚWARNINGÚDEBUGrÚCalledProcessErrorrg)r'ÚoutÚerrs rr_zMovieWriter.finishFà—:‘:×+‰ˆˆSäœG C›LÓÜœG C›LÓ0ˆÙ Ü H‰HØ#'§:¡:×#8Ò#8”¼g¿m¹mØ)¨3ô
 Ü H‰HØ#'§:¡:×#8Ò#8”¼g¿m¹mØ)¨3ô
 :‰:× Ò Ü×
×% t§z¡z§¡¸¸SóBð
Bð !rc ó4t|«tjd«|jj |j
|j «|jj|jjf|j|jdœ|¤Žy)Nz'MovieWriter.grab_frame: Grabbing frame.©Úformatr) Ú_validate_grabframe_kwargsrdr€rQrr†r‡Úsavefigr•rrxrrYs rr[zMovieWriter.grab_frameXsqä" 
Ð
× Ñ  §¡¨$¯'©'Ôˆ×јŸ× 9°$×2CÑ2CØ!ŸX™Xñ 9Ø)7ó 9rcótd«S)z9Assemble list of encoder-specific command-line arguments.z)args needs to be implemented by subclass.©ÚNotImplementedErrorr&s rrzMovieWriter._argscsä"Ð#NÓOrcóNttj|j«S)
Return the binary path to the commandline tool used by a specific
subclass. This is a class method so that the tool can be looked for
before making a particular MovieWriter subclass available.
)ÚstrrGrcÚ _exec_key©r3s rÚbin_pathzMovieWriter.bin_pathgsô”3—<< §
¡
Ñ/rcóLtj|j««duS)z<Return whether a MovieWriter subclass is actually available.N)ÚshutilÚwhichr®r­s rr2zMovieWriter.isAvailablepsô|‰|˜CŸL™L+°4Ð7r)rjNNNNr#)r=r>r?r@rwr(rRrˆr_r[rÚ classmethodr®r2Ú
__classcell__©rzs@rrqrqåsfø„ñð0 ˜ÐàCGØõ#%òJ õò
Bò$ Pðñðñô8rrqcózeZdZdZˆfdZd
dZdZed«Zejd«ZdZ
dZ ˆfd „Z ˆxZ
S) ÚFileMovieWriterz}
`MovieWriter` for writing to individual files and stitching at the end.
This must be sub-classed to be useful.
cóTt||i|¤Žtjd|_y)Nzanimation.frame_format)rvr(rGrcrx)r'rgrhrzs €rr(zFileMovieWriter.__init__|s'ø€Ü
ј) ŸL™LÐ)AÑBˆÕrcóžt|«jjd¬«||_||_||jj
}||_|j
«|€>t«|_tt|jjd««|_ nd|_||_ d|_ t«|_d|_y)
Setup for writing the movie file.
Parameters
----------
fig : `~matplotlib.figure.Figure`
The figure to grab the rendered frames from.
outfile : str
The filename of the resulting movie file.
dpi : float, default: ``fig.dpi``
The dpi of the output file. This, with the figure size,
controls the size in pixels of the resulting movie file.
frame_prefix : str, optional
The filename prefix to use for temporary files. If *None* (the
default), files are written to a temporary directory which is
deleted by `finish`; if not *None*, no temporary files are
deleted.
TrLtmprz
%s%%07d.%s)rrNrOrQrPrrÚ_tmpdirr«r,Ú temp_prefixÚ_frame_counterr9Ú _temp_pathsÚfname_format_str)r'rQrPrÚ frame_prefixs rrRzFileMovieWriter.setup€ô(
ˆW
×Ñ×$¨DЈŒØˆŒ Ø ˆ;Ø—(‘(—,‘,ˆC؈ŒØ ×ÑÔ Ð Ü/ˆDŒLÜ"¤4¨¯ © ×(9Ñ(9¸5Ó#AÓBˆDÕ àˆDŒLØ+ˆDÔ ØˆÔÜ›6ˆÔØ ,ˆÕrcólt|d«r(|jr|jj«yyy)Nrº)ÚhasattrrºÚcleanupr&s rÚ__del__zFileMovieWriter.__del__¦s*Ü Ô ¯ ª Ø L‰L× Ñ Õ )5Ð #rcó|jS)
Format (png, jpeg, etc.) to use for saving the frames, which can be
decided by the individual subclasses.
)Ú
_frame_formatr&s rrxzFileMovieWriter.frame_formatªsð ×!rc óÖ||jvr||_ytjd|dt |«j
d|jdd«|jd|_y)NzIgnoring file format z which is not supported by z; using rz instead.)rwr Ú
warn_externalrtr=)r'rxs rrxzFileMovieWriter.frame_format²srà ˜4× 1Ø!-ˆDÕ ä × Ñ Ø Ð'7ð8 Ü $ 
× 3Ñ 3Ð4°HØ×)¨!Ñ-¨Yð
"&×!7Ñ!7¸Ñ!:ˆ rcóL|j|j|jfzSr#)rxr&s rÚ_base_temp_namezFileMovieWriter._base_temp_name½s&ð××(8Ñ(8¸$×:KÑ:KÐ'LÑLrc ó²t|«t|j«|jz«}|jj |«|xjdz
c_t jd|j|«t|d«5}|jj|f|j|jdœ|¤Žddd«y#1swYyxYw)z8FileMovieWriter.grab_frame: Grabbing frame %d to path=%sÚwbr£)
rÚappendrdr€ÚopenrQrxr)r'rZÚpathÚsinks rr[zFileMovieWriter.grab_frameÂô # D×*¨T×-@Ñ-@ÑØ ×Ñ×Ñ Ô ×Ò˜qÑ ÕÜ
Ð×ô
$˜Ó
ðØ ˆDH‰H× Ñ ˜Tð
/¨$×*;Ñ*;ÀÇÁñ

 /ús Â5C
Ã
Ccój |j«t| «|jr;tj d|j«|jj
«yy#|jr;tj d|j«|jj
«wwxYw)Nú'MovieWriter: clearing temporary path=%s)rˆrvr_rdr€)r'rzs €rr_zFileMovieWriter.finishÏsø€ð I‰IŒKÜ ‰G‰NÔ à|Š|Ü
Ø=¸t¿|¹|ôð ×øˆt|Š|Ü
Ø=¸t¿|¹|ôð ×ús ƒA)Á)A B2©NN)r=r>r?r@r(rRrmrxÚsetterrÉr[r_r´s@rvs\ø„ñô
Có$-òLñð×ÑñðMò
  'rÚpillowcóBeZdZdZed«Zdˆfd„ ZdZdZˆxZ S)Ú PillowWritercóy©NTr.r&s rrWz#PillowWriter._supports_transparencyßsØrcóyr.r­s rr2zPillowWriter.isAvailableâóàrcó8t||||¬«g|_yr…)rvrRÚ_framesr‰s €rrRzPillowWriter.setupæsø€Ü

c˜ˆ
Ôˆ rc ó®t|«t«}|jj|fii|¥d|jdœ¥¤Žt j d|j|j«dddd«}|j«dddkr|jj|«y|jj|jd ««y)
NrrÚRGBAÚrawrééÿÚRGB)
rrQrrÚ
frombufferrUÚ getbufferÚ
getextremarÝÚconvert)r'rZÚbufÚims rr[zPillowWriter.grab_frameêÜ" ‹iˆØˆ×ÑØ ñ JØH¸t¿x¹xÒ Jä
×
Ñ
Ø D—O‘O S§]¡]£_°e¸VÀQÈóKˆà
=‰=?˜ ˜   L‰L× Ñ  Õ 
L‰L× Ñ  §
¡
¨5Ó 1Õ 2rc ó¤|jdj|jd|jddtd|jz «d¬«y)NrTrËéè)Úsave_allÚ
append_imagesÚdurationÚloop)ÚsaverPrrEr&s rr_zPillowWriter.finishùsEØ Q‰×ÑØ L‰L 4°t·|±|ÀAÀBÐ7Gܘ §¡Óð õ 3rr#)
r=r>r?rWr2rRr[r_r´s@rr×r×Ýs+ø„òðñóðõò
3rr×có.eZdZdZdZdZdZed«Zy)Ú
FFMpegBasez†
Mixin class for FFMpeg output.
This is a base class for the concrete `FFMpegWriter` and `FFMpegFileWriter`
classes.
zanimation.ffmpeg_pathzanimation.ffmpeg_argscóft|j«j}|dvry|jdvS)ú.gifú.apngú.avifú.webmú.webpT>ÚbmpÚdpxÚgifÚpngÚapngÚavrpÚcfhdÚffv1ÚtiffÚv408ÚljpegÚqtrleÚtargaÚproresÚffvhuffÚhuffyuvÚutvideoÚjpeg2000ÚrawvideoÚ prores_awÚ prores_ks)rrPÚsuffixrI©r'rs rrWz!FFMpegBase._supports_transparency s:Üd—l‘lÓØ Ð ð z‰zð >rcóg}t|j«j}|dvr |dd|_n|j d|jg«|j
|j
nt j|j}|jdk(rd|vr|j ddg«nM|jdk(rd|vr|j dd g«n&|jd
k(rd|vr|j gd ¢«|jd kDr |j d
d|jzg«|jj«D]\}}|j d|d|g«Œ|j |«|d|jgzS)Nrôú-vcodecr|ú-pix_fmtÚyuv420prüú-filter_complexz1split [a][b];[a] palettegen [p];[b][p] paletteuseÚavif)rz.split [rgb][rgba]; [rgba] alphaextract [alpha]ú-mapz[rgb]rz[alpha]rz-bz%dkz -metadataú=z-y) rrPrrIÚextendryrGrcÚ _args_keyrJrFÚitems)r'rgrryÚvs rÚ output_argszFFMpegBase.output_argssjàˆÜd—l‘lÓØ Ð   ˜ˆD K‰K˜ D§J¡JÐ 0Ø)-¯©Ð)Dd—oŸ<™<¨¯©Ñ ð :‰:˜Ò  J°jÑ$@Ø K‰K˜ YÐ Z‰Z˜
Ð%6¸jÑ%HØ K‰KÐNõ
OðZ‰Z˜
!Ð&7¸zÑ&IØ K‰Kò
 <‰<˜ Ø K‰K˜˜u t§|¡|Ñ —MM× 3‰DˆAˆ K‰K˜¨¨¨1¨Q¨C jÐ  àt˜TŸ\™\Ð*rN) r=r>r?r@rrWrmrr.rrs,ñð(€IØ'€Iò ñ ñ +rÚffmpegcóeZdZdZdZy)Ú FFMpegWriterat
Pipe-based ffmpeg writer.
Frames are streamed directly to ffmpeg via a pipe and written in a single pass.
This effectively works as a slideshow input to ffmpeg with the fps passed as
``-framerate``, so see also `their notes on frame rates`_ for further details.
.. _their notes on frame rates: https://trac.ffmpeg.org/wiki/Slideshow#Framerates
c
ó|j«dddddd|jzd|jdt|j«g }t
j
«tjkDr|dd gz
}|d
d g|jzz
}|S) -fr rz-sú%dx%drú
-framerateú -loglevelÚerrorú-izpipe:)
rUrxrErdÚgetEffectiveLevelrœr©r'rgs rrzFFMpegWriter._argsKs…ð
  z°9¸jا¡Ñ¸T×=NÑ=NØœc $§(¡(›mðô × #¤g§m¡mÒ [  *ˆ w $×"2Ñ"2Ñ2ˆØˆ rN)r=r>r?r@rr.rrr!r!?s ñ ó rr!Ú ffmpeg_filecóeZdZdZgd¢ZdZy)ÚFFMpegFileWriteray
File-based ffmpeg writer.
Frames are written to temporary files on disk and then stitched together at the end.
This effectively works as a slideshow input to ffmpeg with the fps passed as
``-framerate``, so see also `their notes on frame rates`_ for further details.
.. _their notes on frame rates: https://trac.ffmpeg.org/wiki/Slideshow#Framerates
©Újpegrrrc óŒg}|jdvr|dddddd|jzdd gz
}|d
t|j«d |j «gz
}|j
s|d t|j «gz
}tj«tjkDr|d
dgz
}|j«g|¢|j¢S)N>rrr#Úimage2rr z -video_sizer$z
-pixel_formatrrr%r(z -frames:vr&r')
rxrUrErdr)rr*s rrzFFMpegFileWriter._argsiðˆà × Ñ  Ñ Øh  ¨:ؘw¨¯©Ñ ðñ
ˆ
œs 4§8¡8}¨d°D×4HÑ4HÓ4JÐKˆØ|Š|Ø [¤# d×&9Ñ&9Ó":Ð ;ˆ × #¤g§m¡mÒ [  *ˆ
Ð: ×)9Ñ)9Ð:rN)r=r>r?r@rwrr.rrr-r-[sñ òó;rr-cóTeZdZdZdZdZdZdZeˆfd«Z eˆfd«Z
ˆxZ S)ÚImageMagickBasea
Mixin class for ImageMagick output.
This is a base class for the concrete `ImageMagickWriter` and
`ImageMagickFileWriter` classes, which define an ``input_names`` attribute
(or property) specifying the input names passed to ImageMagick.
zanimation.convert_pathzanimation.convert_argscóHt|j«j}|dvS)Nrô)rrPrrs rrWz&ImageMagickBase._supports_transparencyŒs"Üd—lØÐErc óZ|jdk(rdn |j}|j |jntj|j}|j «dd|j zdddtd|jz «d d
|d |jg
|¢|jS) Nràrrz-sizez%ix%iz-depthÚ8z-delayédz-loopÚ:) rxryrGrcrrUrEÚ input_namesrP)r'Úfmtrys rrzImageMagickBase._argss­à×)¨UÒ2‰f¸×8IÑ8IˆØ)-¯©Ð)Dd—oŸ<™<¨¯©Ñ ð
M‰M‹OØ W˜tŸÑ  ”c˜# §¡™.Ó ˆe1T×

ðð 
ð
L‰Lð 
ð
rcólt|«}|dk(rtjd«j}|S)NrçÚmagick)rvrGÚ_get_executable_infoÚ
executable)r3Úbinpathrzs €rzImageMagickBase.bin_path s3ø€ä$ˆØ  Ü×.¨xÓCˆG؈rcóŽ t|«S#tj$r }tj d|«Yd}~yd}~wwxYw)Nz"ImageMagick unavailable due to: %sF)rvr2rGÚExecutableNotFoundErrorrdr€)r3Ú_enfrzs €rr2zImageMagickBase.isAvailable§s>ø€ð Ü (øÜ× ä J‰JÐ;¸TÔ ûð úsƒ
A¤?¿A) r=r>r?r@rrWrr2r´s@rr3r3sGø„ñð)€IØ(€IòFò
ð óóðð óóôrr3Ú imagemagickcóeZdZdZdZy)ÚImageMagickWriterz‡
Pipe-based animated gif writer.
Frames are streamed directly to ImageMagick via a pipe and written
in a single pass.
ú-N)r=r>r?r@r:r.rrrFrF²sñðKrrFÚimagemagick_filecó*eZdZdZgd¢Zed«Zy)ÚImageMagickFileWriterz‡
File-based animated gif writer.
Frames are written to temporary files on disk and then stitched
together at the end.
r.có8|jd|jS)Nz*.)rxr&s rú<lambda>zImageMagickFileWriter.<lambda>Ês˜×¨D×,=Ñ,=Ð+>Ð?€rN)r=r>r?r@rwrmr:r.rrrJrJ¿sñòÙÙAKrrJcó2tj|||¬«S)N)ÚNframesÚ frame_dirrx)r )Ú frame_countrxrOs rÚ_included_framesrQÏsÜ × !¨+Ø,5Ø/;ô =rcófdk(rdŠdŠddjˆˆfdt|«D««zS)z7frame_list should be a list of base64-encoded png filesÚsvgzsvg+xmlz, frames[{0}] = "data:image/{1};base64,{2}"
ú
Úc 3ójK|]*\}}j||jdd««Œ,y­w)rTz\
N)Úreplace)Ú.0Ú
frame_datarxÚtemplates €€rú <genexpr>z#_embedded_frames.<locals>.<genexpr>Ûs7øèø€ò ˆAˆz𠘘×);Ñ);¸DÀ&Ó)I×4ùsƒ03)ÚjoinÚ enumerate)Ú
frame_listrxr[s `@rÚ_embedded_framesr`Õs?ù€àà ˆ Ø>€HØ "—'&  4rÚhtmlcó^eZdZdZgd¢Zed«Z dˆfd„ Zd ˆfd„ ZˆfdZ dZ
ˆxZ S)
Ú
HTMLWriterz(Writer for JavaScript-based HTML movies.)r/rrScóyr.r­s rr2zHTMLWriter.isAvailableærc ó<|rtjd«d}||_|j«|_t j gd¢|j¬«tj|d«|_ |xjdzc_ t‰ |-|||||«y)NzHTMLWriter ignores 'extra_args'r.)ÚonceÚreflect)Ú default_modeúanimation.embed_limité) rdÚwarningÚ embed_framesÚlowerrhr Ú
check_in_listrGrHÚ _bytes_limitrvr()
r'rErIrJryrFrlrhÚ embed_limitrzs
€rr(zHTMLWriter.__init__ês‰ø€ñ Ü L‰LÐ ˆ
ØÔØÔÜ ×ÑÒ6Ø(,×(9Ñ(9õ ŸN™N¨;Ð8OÓÔà ×Ò˜[Ñä
ј˜e W¨j¸(ÕCrcóLt|«}tjddg|j¬«g|_d|_d|_|js9||j|jdz«}|jdd¬«|d z }nd}t|1||||«d|_
y)
Nz.htmlz.htm)Úoutfile_extensionrFrÝT)ÚparentsÚexist_okÚframe)rr rnrÚ
_saved_framesÚ _total_bytesÚ
_hit_limitrlÚ with_nameÚstemÚmkdirrvrRÚ _clear_temp)r'rQrPrrOr¿rzs €rrRzHTMLWriter.setupýsø€Üw“-ˆÜ ×јG VÐÇÁÕˆÔØˆÔ؈Œà× Ò ØÐ Ø-¨g¯l©l¸YÑ.FÓG Ø O‰O D°4ˆ $ .‰LàˆLä

c˜7 C¨Ô ˆÕrc óXt|«|jr|jryt«}|jj
|f|j |jdœ|¤Žtj|j««jd«}|xjt|«z
c_ |j|jk\r3tj!d|j|j«d|_y|j"j%|«yt'|Pdi|¤ŽS)Nr£ÚasciizãAnimation size has reached %s bytes, exceeding the limit of %s. If you're sure you want a larger animation embedded, set the animation.embed_limit rc parameter to a larger value (in MB). This and further frames will be dropped.Tr.)rlrxrrQrxrÚbase64Ú encodebytesÚgetvalueÚdecoderwÚlenrordrkrvrvr[)r'rZÚfÚ imgdata64rzs €rr[zHTMLWriter.grab_frameø€Ü"  × Ó àŠØÜ“ ˆAØ ˆDH‰H× Ñ ˜Qð
= t×'8Ñ'8Ø!%§¡ñ
=Ø-;ò
×*¨1¯:©:«<ÓÓHˆIØ × Ò ¤ Y£Ñ Ø× Ñ  D×$5Ñ$5Ò ðð!%× 1Ñ 1°4×3DÑ3Dô Fð #'à×"×)¨)ÕÑ 7rc óX|jr6t|j|j«}t |j«}nft |j
«}t
||j|j
djj|jj««}tddd¬«}d||jdz<d|jz}t|jd«5}|jtt z«|jt#j$d
t'j(«j*|||dœ|¤Ž«ddd«|j,r;t.j1d |j,«|j,j3«yy#1swYŒQxYw) NrrU)Ú once_checkedÚ loop_checkedÚreflect_checkedÚcheckedÚ_checkedrër)ÚidrNÚ fill_framesÚintervalrÒr.)rlr`rvrxrQrNÚ relative_torPr$rhrEÚwriter
r rÚuuidÚuuid4Úhexrºrdr€)r'rrPÚ mode_dictrŽÚofs rr_zHTMLWriter.finish(sgà × Ò Ü*¨4×+=Ñ+=Ø+/×+<Ñ+<ó>ˆ˜d×1‰Kô˜d×/ˆKܘT×× Ñ  Ñ6°t·|±|×7JÑ7JÓMˆ bØ&(Ø)+ô-ˆ ð5>ˆ $×# ˜4Ÿ8™8Ñä
$—,, Ó
Ø H‰H”Z¤-Ñ H‰HÔ·
±
³ ×0@Ñ0@Ø5@Ø9DØ6>ñ09ñ 
 <Š<Ü J‰JÐ@À$Ç,Á,Ô L‰L× Ñ Õ  ÷ ;ús
Ã.A"F Æ F))éNNNNFrïNrÓ) r=r>r?r@rwr2r(rRr[r_r´s@rrcrcàs@ø„áàñóððEIØAGØDõ&!ô&8ö0"#rrccó®eZdZdZddZdZdZdZ dddœdZd „Z d
Z
d Z d Z d
Z
dZdZdZdZdZdZdZdZddZddZdZdZdZy)Ú AnimationaÚ
A base class for Animations.
This class is not usable as is, and should be subclassed to provide needed
behavior.
.. note::
You must store the created Animation in a variable that lives as long
as the animation should run. Otherwise, the Animation object will be
garbage-collected and the animation stops.
Parameters
----------
fig : `~matplotlib.figure.Figure`
The figure object used to get needed events, such as draw or resize.
event_source : object, optional
A class that can run a callback when desired events
are generated, as well as be stopped and started.
Examples include timers (see `TimedAnimation`) and file
system notifications.
blit : bool, default: False
Whether blitting is used to optimize drawing. If the backend does not
support blitting, then this parameter has no effect.
See Also
--------
FuncAnimation, ArtistAnimation
Ncód|_||_|xr|jj|_|j «|_||_|jjd|j«|_
|jjjd|j«|_ |jr|j«yy)NFÚ
draw_eventÚ close_event)Ú_draw_was_startedÚ_figÚcanvasÚ
supports_blitÚ_blitÚ
new_frame_seqÚ frame_seqÚ event_sourceÚ mpl_connectÚ_startÚ_first_draw_idÚ_stopÚ _close_idÚ _setup_blit)r'rQÚblits rr(zAnimation.__init__oØ!&ˆÔàˆŒ ðÒ6˜cŸj™j׌
ð ׌ØÔð"Ÿj™j×4°\À4Ç;Á;ÓÔðŸ×5°mØ6:·j±jóBˆŒà :Š:Ø × Ñ Õ ð rcóJt|dd«stjd«yy)NrœTzéAnimation was deleted without rendering anything. This is most likely not intended. To prevent deletion, assign the Animation to a variable, e.g. `anim`, that exists until you output the Animation using `plt.show()` or `anim.save()`.)ÚgetattrÚwarningsÚwarnr&s rzAnimation.__del__Šs%Ü0°$Ô M‰Mð
ð8rcóJ|jjj«ry|jjj|j«|j «|j j|j«|j j«y)z
Starts interactive animation. Adds the draw frame command to the GUI
handler, calls show to start the event loop.
N)
rÚ is_savingÚmpl_disconnectr¦Ú
_init_drawr£Ú add_callbackÚ_stepÚstartr*s rzAnimation._start”ssð 9‰9× Ñ × à ×Ñ××(;Ñ(;Ô
Ôð
×Ñ×& t§z¡zÔ ×Ñ×ÑÕ!rcó0|jr/|jjj|j«|jjj|j
«|j j|j«d|_yr#) r rÚ
_resize_idr¨Úremove_callbackr´r*s rzAnimation._stop§saà :Š:Ø I‰I× Ñ × +¨D¯O©OÔ  ×Ñׯ©Ô ×Ñ×)¨$¯*©*Ô ˆÕr)Úprogress_callbackc 
óNg} | | jˆfd| D««| D] }
d|
_Œ |tjd}n2t |t
«s"t
d|||||fD««r td«|
i}
n t|
«}
|td«rdjz }tj|d «}|d
k(rjj}i}|||d <|||d <|||d
<|||d<t |t
«r t|}||fi|¤Ž}t j%dt'|««d|
vr&t j#d«|
j)d«d}|j+j||«5t-j.jj0dd¬«5|j3«sR|
j5dtjd«}|dk(rjj7«}||«|
d<d|
d<| D]}
|
j9«Œd}| Dcgc]}t;|dd«Œ}}d|vrd}n t=|«}t?| Dcgc]}|jA«Œc}ŽD]L}t?| |«D])\}
}|
jC|d¬«| Œ| ||«|dz
}Œ+|jDdi|
¤ŽŒN ddd«ddd«y#t$r t}t j#d|«YŒôwxYwcc}wcc}w#1swYŒHxYw#1swYyxYw)aj
Save the animation as a movie file by drawing every frame.
Parameters
----------
filename : str
The output filename, e.g., :file:`mymovie.mp4`.
writer : `AbstractMovieWriter` subclass or str, default: :rc:`animation.writer`
The writer used to grab the frames and create the movie file.
This can be an instance of an `AbstractMovieWriter` subclass or a
string. The builtin writers are
================== ==============================
str class
================== ==============================
'ffmpeg' `.FFMpegWriter`
'ffmpeg_file' `.FFMpegFileWriter`
'imagemagick' `.ImageMagickWriter`
'imagemagick_file' `.ImageMagickFileWriter`
'pillow' `.PillowWriter`
'html' `.HTMLWriter`
================== ==============================
fps : int, optional
Movie frame rate (per second). If not set, the frame rate from the
animation's frame interval.
dpi : float, default: :rc:`savefig.dpi`
Controls the dots per inch for the movie frames. Together with
the figure's size in inches, this controls the size of the movie.
codec : str, default: :rc:`animation.codec`.
The video codec to use. Not all codecs are supported by a given
`MovieWriter`.
bitrate : int, default: :rc:`animation.bitrate`
The bitrate of the movie, in kilobits per second. Higher values
means higher quality movies, but increase the file size. A value
of -1 lets the underlying movie encoder select the bitrate.
extra_args : list of str or None, optional
Extra command-line arguments passed to the underlying movie encoder. These
arguments are passed last to the encoder, just before the output filename.
The default, None, means to use :rc:`animation.[name-of-encoder]_args` for
the builtin writers.
metadata : dict[str, str], default: {}
Dictionary of keys and values for metadata to include in
the output file. Some keys that may be of use include:
title, artist, genre, subject, copyright, srcform, comment.
extra_anim : list, default: []
Additional `Animation` objects that should be included
in the saved movie file. These need to be from the same
`.Figure` instance. Also, animation frames will
just be simply combined, so there should be a 1:1 correspondence
between the frames from the different animations.
savefig_kwargs : dict, default: {}
Keyword arguments passed to each `~.Figure.savefig` call used to
save the individual frames.
progress_callback : function, optional
A callback function that will be called for every frame to notify
the saving progress. It must have the signature ::
def func(current_frame: int, total_frames: int) -> Any
where *current_frame* is the current frame number and *total_frames* is the
total number of frames to be saved. *total_frames* is set to None, if the
total number of frames cannot be determined. Return values may exist but are
ignored.
Example code to write the progress to stdout::
progress_callback = lambda i, n: print(f'Saving frame {i}/{n}')
Notes
-----
*fps*, *codec*, *bitrate*, *extra_args* and *metadata* are used to
construct a `.MovieWriter` instance and can only be passed if
*writer* is a string. If they are passed as non-*None* and *writer*
is a `.MovieWriter`, a `RuntimeError` will be raised.
Nc3óRK|]}|jjur|Œ y­wr#)r)rXÚanimr's €rr\z!Animation.save.<locals>.<genexpr>
s(øèø€ò7 TØ#Ÿy™y¨D¯I©IÑ7ùsƒ$'animation.writerc3ó$K|]}|duŒ
y­wr#r.)rXÚargs rr\z!Animation.save.<locals>.<genexpr>sèø€òJØð˜T”/ñJùszâPassing in values for arguments fps, codec, bitrate, extra_args, or metadata is not supported when writer is an existing MovieWriter instance. These should instead be passed as arguments when creating the MovieWriter instance.Ú _intervalç@@z savefig.dpiÚfigurerIrJryrFz1MovieWriter %s unavailable; using Pillow instead.zAnimation.save using %sÚ bbox_incheszŒWarning: discarding the 'bbox_inches' argument in 'savefig_kwargs' as it may cause frame size to vary, which is inappropriate for animation.cóxtj|«\}}}}|tj|||g«zdz|z
S)NrË)ÚmcolorsÚto_rgbarÚarray)ÚcolorÚas rÚ_pre_composite_to_whitez/Animation.save.<locals>._pre_composite_to_whiteOs<Ü Ÿ¨Ó/‰JˆAˆq!”r—xx  A q  Ó*¨QÑÑ 2r)Ú
_is_savingÚmanagerÚ facecolorzsavefig.facecolorÚautoFÚ transparentrÚ _save_count)r.)#rrGrcÚ
isinstancer«Úanyr;r$rHrrÚwritersr×rdrkrertÚpoprir
Ú _setattr_cmržrWÚgetÚ
get_facecolorr²ÚsumÚzipÚnew_saved_frame_seqÚ_draw_next_framer[)r'ÚfilenameÚwriterrErrIrJryrFÚ
extra_animrZÚall_animr¼Ú
writer_kwargsr+Ú frame_numberrÌÚsave_count_listÚ total_framesÚdataÚds` rzAnimation.save¯s}ø€ðrØ Ð O‰Oó7¨Zô
ò *ˆDØ%)ˆ  ˆ—\\Ð"4Ñ5‰FܘV¤SÔñJØ! 5¨'°:¸JôJäð
 Ð ‰Nô" 1ˆ ˆ;œ7 Ô˜$Ÿ.™.Ñ(ˆCôn‰n˜S -ÓØ (Š?Ø—)‘)—-‘-ˆCàˆ
Ø Ð Ø%*ˆM˜ Ð Ø'.ˆM˜ Ð !Ø*4ˆM˜ Ð Ø(0ˆM˜  fœcÔ 
$ V™_
ñ
  Ñ5 }Ñ5ˆ ‰ Ð+¬T°&«\Ô ˜ L‰LðJô
Kð
× Ñ ˜}Ô m‰m˜DŸI™I x°Ó×Ñ § ¡ × 0Ñ 0¸TÈ4Ô×*×.¨{Ü/2¯|©|Ð<OÑ/PóR à Ò&Ø $§ ¡ × 7Ñ 7Ó 9IÙ.EÀiÓ.P˜+Ø05˜ ò
"ØÕ
ˆ)1ö2Ø#$ô ' q¨-¸Õ2ˆÑ# ä" 3 ܸH¸!˜a×
4Ü" 8¨TÓ*GD˜×)¨!°%Ð)¨,¸ ÔÑ)™ ð  "×3 
4÷+ 4øô7 ò
)
Ü ð(Ø)/÷
1üòT2ùò I÷+ 4ú÷ 4ús[Ä KÅ?-LÆ,BLÈ,LÉLÉL
É4.LÊ#$LËLË%LÌLÌ
LÌL ÌLÌL$có† t|j«}|j||j«y#t$rYywxYw)z‰
Handler for getting events. By default, gets the next frame in the
sequence and hands the data off to be drawn.
TF)Únextr¢r Ú
StopIteration)r'rgÚ framedatas rr´zAnimation._stepts>ð ܘTŸ^™^Ó,ˆIØ × ! )¨T¯Z©ZÔ øÜò Ùð ús14´ A¿Acó,t|j«S)z+Return a new sequence of frame information.)ÚiterÚ
_framedatar&s rzAnimation.new_frame_seqƒsôD—O$rcó"|j«S)z8Return a new sequence of saved/cached frame information.)r&s rzAnimation.new_saved_frame_seqˆsð×#rcón|j||«|j|«|j||«yr#)Ú _pre_drawÚ _draw_frameÚ
_post_draw©r's rzAnimation._draw_next_frames.ð
y  ×Ñ˜Ô ˜  4Õ(rcód|_y)r&s rzAnimation._init_draw”s ð"&ˆÕrcó@|r|j|j«yyr#)Ú _blit_clearÚ_drawn_artistsrõs rzAnimation._pre_draw™s ñ Ø × Ñ ˜T×  rcótd«)NzDNeeds to be implemented by subclasses to actually make an animation.r¨)r's rzAnimation._draw_frameŸsä#AóBð Brcó |r(|jr|j|j«y|jjj «yr#)Ú
_blit_drawrÚ draw_idlerõs rzAnimation._post_draw¤s7ñ D× O‰O˜D× I‰I× Ñ × (rcóø|Dchc]}|jŒ}}|D]}|j«}|jj|t «df«\}}||k7sŒB||j
j j|j«f|j|<Œ|D]}|jj|«Œ|D]1}|j
j j|j«Œ3ycc}wr#) ÚaxesÚ _get_viewÚ _blit_cacherÙÚobjectrÂÚcopy_from_bboxÚbboxÚ draw_artistrª)r'ÚartistsrÌÚ
updated_axÚaxÚcur_viewÚviewÚbgs rzAnimation._blit_draw®ð'.Ö. a—f“fÐ.ˆ
Ðò HˆBð—||“~ˆ×'×+¨B´³¸4Ð0@ÓA‰HˆD˜à˜bŸi™i×=¸b¿g¹gÓ(H× Ñ  Ò Hðò "ˆ
F‰F× Ñ ˜ ò +ˆ I‰I× Ñ × ! "§'¡'Õ  +ùò!/sC7có:|Dchc]}|jŒ}}|D]i} |j|\}}|j«|k(r&|jj
j
|«ŒO|jj|«Œkycc}w#t$rYŒ}wxYwr#)rÿrr1rÚrestore_regionr×)r'rrÿrr
r s rzAnimation._blit_clearÄs˜ð!(Ö(˜1ÐÐò )ˆBð
Ø×+¨BÑ/‘|‰|‹~ Ò— ‘ × Ñ ×Õ× Ñ ×$ RÕ )ùò)øôò
Ùð
úsB  BÂ BÂBcóòt«|_g|_|jd|j«|j «|j jjd|j«|_
y) resize_event) r$rr rÚ
_on_resizer·r&s rzAnimation._setup_blitÓsXä›6ˆÔØ ˆÔà ˜˜dŸj™jÔ
ÔàŸ)™)×6°~Ø7;·±óHˆrcóT|jjj|j«|jj «|j j«|j«|jjjd|j«|_y)Nrš) rÚstoprÚclearr²Ú _end_redraw©r'Úevents rrzAnimation._on_resizeâsvð
×Ñׯ©Ô ×Ñ×ÑÔ Ø ×Ñ×ÑÔ Ø ÔØŸ)™)×6°|Ø7;×7GÑ7GóIˆrcó$|jdd«|jj«|jjj |j «|jjjd|j«|_y)NFr) rôrrrs rrzAnimation._end_redrawîsfð
˜˜eÔ ×Ñ×ÑÔ ×Ñׯ©ÔŸ)™)×6°~Ø7;·±óHˆrcó4d}t|d«stj|d«}|dz}t«5}t |d«}t
tj d}|dtj dd |jz ¬
«}|jt|«|¬ «tj|j««}d d d «t«}||k\rtjd
||«n4|j!d«|_dj$j&Ž|_t|d«rYddg} t+|dd«r| j-d«|j%|j"|j(dj/| «¬«Sy#1swYŒËxYw)a
Convert the animation to an HTML5 ``<video>`` tag.
This saves the animation as an h264 video, encoded in base64
directly into the HTML5 video tag. This respects :rc:`animation.writer`
and :rc:`animation.bitrate`. This also makes use of the
*interval* to control the speed, and uses the *repeat*
parameter to decide whether to loop.
Parameters
----------
embed_limit : float, optional
Limit, in MB, of the returned animation. No animation is created
if the limit is exceeded.
Defaults to :rc:`animation.embed_limit` = 20.0.
Returns
-------
str
An HTML5 video tag with the animation embedded as base64 encoded
h264 video.
If the *embed_limit* is exceeded, this returns the string
"Video too large to embed."
z<video {size} {options}>
<source type="video/mp4" src="data:video/mp4;base64,{video}">
Your browser does not support the video tag.
</video>Ú
_base64_videorirjztemp.m4vr½r|rD)rIrJrE©Nz±Animation movie is %s bytes, exceeding the limit of %s. If you're sure you want a large animation embedded, set the animation.embed_limit rc parameter to a larger value (in MB).r~zwidth="{}" height="{}"ÚcontrolsÚautoplayÚ_repeatFrïú )ÚvideoÚsizeÚoptionszVideo too large to embed.)rGrHrrrcrr€Ú
read_bytesrƒrdrkrrrUÚ _video_sizer¬r])
r'rpÚ VIDEO_TAGÚtmpdirrÏÚWriterràÚvid64Úvid_lenr!s
rÚto_html5_videozAnimation.to_html5_video÷sð2 ˆ ô
t˜_ÕŸ.™.¨Ð6MÓNˆKð
˜ &ˆ
ܘF JÓ/ô§¡Ð.@Ñ!AÑBÙ fÜ(+¯ © Ð5HÑ(IØ$)¨D¯N©NÑ$:ô<ð œ#˜d)¨F Ô×*¨4¯?©?Ó+<Ó=÷
˜%“jˆGؘ+Ò ðð!(¨õ  &+§\¡\°'Ó%:Ô"Ø#BÐ#;×#BÑ#BØ×$,Ô ô Ô ! :Ð.ˆGôt˜Y¨Ô˜vÔ×#¨$×*<Ñ*<Ø)-×)9Ñ)9Ø,/¯H©H°WÓ,=ð
/÷K
>ús µBFÆFcó”|t|d«rd|jz }|t|dd«rdnd}t|d«sjt«5}t |d «}t |||¬
«}|j
t|«|¬ «|j«|_ ddd«|jS|jS#1swY|jSxYw) 
Generate HTML representation of the animation.
Parameters
----------
fps : int, optional
Movie frame rate (per second). If not set, the frame rate from
the animation's frame interval.
embed_frames : bool, optional
default_mode : str, optional
What to do when the animation ends. Must be one of ``{'loop',
'once', 'reflect'}``. Defaults to ``'loop'`` if the *repeat*
parameter is True, otherwise ``'once'``.
Returns
-------
str
An HTML representation of the animation embedded as a js object as
produced with the `.HTMLWriter`.
NrÀrFrïrfÚ_html_representationz temp.html)rErlrhr)
rrrcÚ read_textr+)r'rErlrhr%s rÚ to_jshtmlzAnimation.to_jshtmlEð* ˆ;œ7 4¨Ô˜ŸÑ'ˆCð Ð Ü%,¨T°9Ø-2ô&4™6Ø9?ð
ô
ܘF KÓ0ÜØ1=Ø1=ô?ð œ#˜d)¨F Ô3Ø,0¯N©NÓ,<Ô

×(ˆt×
×(ús
ÁA B3Â3Ccó~tjd}|dk(r|j«S|dk(r|j«Sy)z#IPython display hook for rendering.zanimation.htmlÚhtml5ÚjshtmlN)rGrcr)r-)r'r;s rÚ _repr_html_zAnimation._repr_html_qs@äl‰lÐ,ˆØ 'Š>Ø×
HŠ_Ø—> rcó–|jj«|jr#|jD]}|j d«Œyy)zPause the animation.FN)rr Ú set_animated©r'Úartists rÚpausezAnimation.pauseysCà ×Ñ×ÑÔ Ø :Š:Ø×
+Ø×# 
 rcó–|jj«|jr#|jD]}|j d«Œyy)zResume the animation.TN)r r3r4s rÚresumezAnimation.resume€sCà ×Ñ×ÑÔ :Š:Ø×
*Ø×# 
 r©NF) NNNNNNNNNr#)NTN)r=r>r?r@r(rrr)r-r1r6r8r.rrr˜r˜MñóBò6ò"ò&EIØFJØ ðC4à7;ôC4òJ
ò


 Bò
+ò,

Hò
IòHóL/ó\*)òX*rr˜có2eZdZdZ dˆfd„ ZˆfdZˆxZS)ÚTimedAnimationa}
`Animation` subclass for time-based animation.
A new frame is drawn every *interval* milliseconds.
.. note::
You must store the created Animation in a variable that lives as long
as the animation should run. Otherwise, the Animation object will be
garbage-collected and the animation stops.
Parameters
----------
fig : `~matplotlib.figure.Figure`
The figure object used to get needed events, such as draw or resize.
interval : int, default: 200
Delay between frames in milliseconds.
repeat_delay : int, default: 0
The delay in milliseconds between consecutive animation runs, if
*repeat* is True.