403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/matplotlib/backends/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/matplotlib/backends/__pycache__/backend_ps.cpython-312.pyc
�

G8�c��
�T�dZddlZddlZddlmZddlZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddlZddlZddlZddlmZmZmZmZddlmZddlmZmZmZmZdd	lm Z m!Z!dd
l"m#Z#ddl$m%Z%m&Z&ddl'm(Z(dd
l)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ejje6�Z7dZ8Gd�d�Z9e9�Z:idd�dd�dd�dd�dd �d!d"�d#d$�d%d&�d'd(�d)d*�d+d,�d-d.�d/d0�d1d2�d3d4�d5d6�d7d8�d9d:d;d<d=d>d?d@dA��Z;dB�Z<dC�Z=ej|dDdE�F�dG��Z?dH�Z@dI�ZAdJ�ZBdK�ZCGdL�dMe4j��ZEGdN�dOe�ZFGdP�dQe�ZGej|dD�dR��ZHdS�ZIdT�ZJd\dU�ZKd\dV�ZLd]dW�ZMd^dX�ZNeZOgdY�ZPej�GdZ�d[e��ZRy)_zG
A PostScript backend, which can produce both PostScript .ps and .eps.
�N)�Enum)�StringIO)�TemporaryDirectory)�_api�cbook�_path�
_text_helpers)�AFM)�_Backend�FigureCanvasBase�FigureManagerBase�RendererBase)�is_writable_file_like�file_requires_unicode)�get_font)�
LOAD_NO_SCALE�FT2Font)�convert_ttf_to_ps)�	uni2type1)�Path)�
TexManager)�Affine2D)�MixedModeRenderer�)�_backend_pdf_psFc��eZdZd�Zy)�PsBackendHelperc��i|_y�N)�_cached��selfs �@/usr/lib/python3/dist-packages/matplotlib/backends/backend_ps.py�__init__zPsBackendHelper.__init__*s	�����N)�__name__�
__module__�__qualname__r$�r%r#rr)s��r%r�letter)�!@��legal)r+��ledger)r,��a0)�G�z�@@gH�z�gG@�a1)�p=
�c7@r2�a2)�
ףp=�0@r4�a3)��z�Ga'@r6�a4)�
ףp=� @r8�a5)�R���Q@r:�a6)��Q��@r<�a7)�H�z�G@r>�a8)�ffffff@r@�a9)�\��(\�?rB�a10)gR���Q�?rD�b0)�fffffFD@g)\���L@�b1)�)\���<@rG�b2)��Q�E4@rI)�)\���,@rK)���Q8$@rL)�p=
ף@rM)�)\��(@rN)�p=
ף@rO)��G�z@rP)�)\��(�?rQ)g)\��(�?rR)�b3�b4�b5�b6�b7�b8�b9�b10c��ttj�d��D])\}\}}|jd�r�||ks�!||ks�'|cSy)NT)�reverse�lr1)�sorted�	papersize�items�
startswith)�w�h�key�pw�phs     r#�_get_papertypergLsM���	��� 1�4�@��
��X�b�"��>�>�#����r�6�a�"�f��J�	�
r%c�2�djd�|D��S)N� c3�`K�|]&}|d�jd�jd����(y�w)�1.3f�0�.N)�rstrip)�.0�args  r#�	<genexpr>z_nums_to_str.<locals>.<genexpr>Vs*����J�c�s�4�j�(�(��-�4�4�S�9�J�s�,.)�join)�argss r#�_nums_to_strrtUs���8�8�J�T�J�J�Jr%z3.6z a vendored copy of this function)�alternativec��|jdd�}|jdd�}|jdd�}|jdd�}|jd	d
�}tjdd�|�}|jd
�S)zR
    Quote dangerous characters of S for use in a PostScript string constant.
    �\s\\�(s\(�)s\)�'s\251�`s\301s[^ -~\n]c�:�dt|j��zS)Ns\%03o)�ord�group)�xs r#�<lambda>z!quote_ps_string.<locals>.<lambda>cs��y�3�q�w�w�y�>�'A�r%�ascii)�replace�re�sub�decode)�ss r#�quote_ps_stringr�Ysv��
	
�	�	�%��!�A�	�	�	�$���A�	�	�	�$���A�	�	�	�$��!�A�	�	�	�$��!�A�
���|�A�1�E�A��8�8�G��r%c��t|�rGt|�rt|dd��nt|d�}|5tj||�ddd�ytj
||tj��y#1swYyxYw)z�
    Move the contents of file at *src* to path-or-filelike *dst*.

    If *dst* is a path, the metadata of *src* are *not* copied.
    �r�latin-1��encoding�rbN)�
copy_function)rr�open�shutil�copyfileobj�move�copyfile)�src�dst�fhs   r#�_move_path_to_path_or_streamr�gsu���S�!�&�s�+��3��i�0���T�?�	��	(����r�3�'�	(�	(�	���C��F�O�O�<�	(�	(�s�A:�:Bc��
�t|d���
|D�cgc]}�
j|���}}dj�
jd�
jzdjt
t�
j��dj�
fd�|D��t|�dz��}d}g}|D]�}�
j|t�}�
j�\}	}|jd�
j|�djt
t|jd	g|j���d
�zt!j"t%|	dz|�ddd
dd	gd�d�j'd�zdz���|dj|�z|zScc}w)a�
    Subset *chars* from the font at *font_path* into a Type 3 font.

    Parameters
    ----------
    font_path : path-like
        Path to the font to be subsetted.
    chars : str
        The characters to include in the subsetted font.

    Returns
    -------
    str
        The string representation of a Type 3 font, which can be included
        verbatim into a PostScript file.
    r)�hinting_factoraM%!PS-Adobe-3.0 Resource-Font
%%Creator: Converted from TrueType to Type 3 by Matplotlib.
10 dict begin
/FontName /{font_name} def
/PaintType 0 def
/FontMatrix [{inv_units_per_em} 0 0 {inv_units_per_em} 0 0] def
/FontBBox [{bbox}] def
/FontType 3 def
/Encoding [{encoding}] def
/CharStrings {num_glyphs} dict dup begin
/.notdef 0 def
ric3�^�K�|]$}dj�j|�����&y�w)z/{}N)�format�get_glyph_name)ro�glyph_id�fonts  �r#rqz$_font_to_ps_type3.<locals>.<genexpr>�s-�����8�!)�#�\�\�$�*=�*=�h�*G�H�8�s�*-)�	font_name�inv_units_per_em�bboxr��
num_glyphsz�
end readonly def

/BuildGlyph {
 exch begin
 CharStrings exch
 2 copy known not {pop /.notdef} if
 true 3 1 roll get exec
 end
} _d

/BuildChar {
 1 index /Encoding get exch get
 1 index /BuildGlyph get exec
} _d

FontName currentdict end definefont pop
z/%(name)s{%(bbox)s sc
r)�namer��@NF)�m�lr%�cr%Tr�zce} _d�
)r�get_char_indexr��postscript_name�units_per_EMrr�map�strr��len�
load_glyphr�get_path�appendr��horiAdvancer�convert_to_stringrr�)�	font_path�chars�c�	glyph_ids�preamble�	postamble�entriesr��g�vr�s          @r#�_font_to_ps_type3r�ws����"�I�a�0�D�16�7�A��$�$�Q�'�7�I�7���F�T�)�)��� 1� 1�1�����S�$�)�)�,�-��H�H�8�-6�8�8��)�n�q�(��*�
�$�I�&�G��
���O�O�H�m�4���}�}����1����%��+�+�H�5�����S�1�=�=�!�*E�a�f�f�*E�!F�G�)�
��%�%��Q��V�Q���t�U�D�!�
-�d�4�5;�F�7�O�
D��

�	
�
�(�d�i�i��(�(�9�4�4��y8s�F	c��djd�|D��}tjd||�	tj||�}tjd|tj|�j|j�j�t|�}|D�cgc]}|j|���}}t�5}t
jj|d�}	t|	d�5}
|
j|j!��ddd�t#tj$|	�|d|�ddd�ycc}w#1swY�8xYw#1swYyxYw#t&$rtj)d	��wxYw)
a2
    Subset *chars* from the font at *font_path* into a Type 42 font at *fh*.

    Parameters
    ----------
    font_path : path-like
        Path to the font to be subsetted.
    chars : str
        The characters to include in the subsetted font.
    fh : file-like
        Where to write the font.
    �c3�2K�|]}t|����y�wr)�chr)ror�s  r#rqz%_font_to_ps_type42.<locals>.<genexpr>�s����/�A��Q��/���zSUBSET %s characters: %szSUBSET %s %d -> %dztmp.ttf�wbN�*zDThe PostScript backend does not currently support the selected font.)rr�_log�debugr�get_glyphs_subset�os�stat�st_size�	getbuffer�nbytesrr�r�pathr��write�getvaluer�fsencode�RuntimeError�warning)r�r�r��
subset_str�fontdatar�r�r��tmpdir�tmpfile�tmps           r#�_font_to_ps_type42r��sS�����/��/�/�J��J�J�)�9�j�A��"�4�4�Y�
�K���
�
�'��B�G�G�I�4F�4N�4N��%�%�'�.�.�	0��x� ��5:�;��T�(�(��+�;�	�;�
�
!�	G�V��g�g�l�l�6�9�5�G��g�t�$�
/���	�	�(�+�+�-�.�
/�
�b�k�k�'�2�B��I�F�	G�	G��<�
/�
/��	G�	G�������
)�	*�	�	�sT�A2E#�#E�;E#�-E�4 E�)E�=E#�E#�E	�E�E �E#� E#�# Fc�B��tj���fd��}|S)z}
    Wrap `RendererPS` method *meth* to emit a PS comment with the method name,
    if the global flag `debugPS` is set.
    c�z��tr)|jjd�j�d���|g|��i|��S)Nz% r�)�debugPS�	_pswriterr�r&)r"rs�kwargs�meths   �r#�wrapperz!_log_if_debug_on.<locals>.wrapper�s:�����N�N� � �2�d�m�m�_�B�!7�8��D�*�4�*�6�*�*r%)�	functools�wraps)r�r�s` r#�_log_if_debug_onr��s'���
�_�_�T��+��+�
�Nr%c�j��eZdZdZej
d�ZdZd �fd�	Zd�Z	d!d�Z
d!d�Zed	��Z
d!d
�Zed��Zd!d�Zd!d
�Zd!d�Zd�Zd�Zd"d�Zd�Zed#d��Zed#d��Ze	d#d��Zed��Zedd�d��Zed"d��Zed��Zed��Zed��Z ddd�d�Z!�xZ"S)$�
RendererPSz�
    The renderer handles all the drawing primitives using a graphics
    context instance that controls the colors/styles.
    z	fonts/afm�	ps.useafmc���t�|�||�||_tjdrd|_g|_||_d|_d|_	d|_
d|_d|_d|_
d|_i|_|dz|_i|_d|_t'j(�|_t-j.d�t0j2�|_y)N�text.usetexr�H)�superr$r��mpl�rcParams�textcnt�psfrag�imagedpi�color�	linewidth�linejoin�linecap�linedash�fontname�fontsize�_hatches�image_magnification�_clip_paths�_path_collection_idr�CharacterTracker�_character_trackerr��	lru_cacher�r��
_logwarn_once)r"�width�height�pswriterr��	__class__s     �r#r$zRendererPS.__init__s����	�����'�!����<�<�
�&��D�L��D�K� ��
���
������
������
���
���
���
�#+�b�=�� ����#$�� �"1�"B�"B�"D���6�Y�0�0��6�t�|�|�D��r%c�l�|�yt|�dk(r#|ddk(ry|ddk7r|jd�yy)NT��rrzlThe PostScript backend does not support transparency; partially transparent artists will be rendered opaque.F)r�r�)r"�rgb_or_rgbas  r#�_is_transparentzRendererPS._is_transparent sP�����
��
��
"��1�~��"���1�~��"��"�"�M�N��r%Tc��|||f|jk7rI|jj||cxk(r|k(r	nn|d�d�n
|d�d|d�d|d�d��|r|||f|_yyy)Nrkz	 setgray
riz
 setrgbcolor
)r�r�r�)r"r�r��b�stores     r#�	set_colorzRendererPS.set_color.sx��
�q�!�9��
�
�"��N�N� � �$%��K�a�K�%&�d�8�:�!6�$%�d�8�1�Q�t�H�A�a��X�^�!L�
N����A�Y��
��	#r%c��t|�}||jk7r)|jjd|z�|r||_yyy)Nz%1.3f setlinewidth
)�floatr�r�r�)r"r�r	s   r#�
set_linewidthzRendererPS.set_linewidth6sD���)�$�	�����&��N�N� � �!7�)�!C�D��!*����'r%c�&�ddddddd�|}|d�d�S)Nrr�)�miter�round�bevelrrr�dz
 setlinejoin
r))r�s r#�
_linejoin_cmdzRendererPS._linejoin_cmd=s-����Q�1��q�I�����1��^�,�,r%c��||jk7r5|jj|j|��|r||_yyyr)r�r�r�r)r"r�r	s   r#�set_linejoinzRendererPS.set_linejoinDs?���t�}�}�$��N�N� � ��!3�!3�H�!=�>�� (��
��%r%c�&�ddddddd�|}|d�d�S)Nrrr)�buttr�
projectingrrrrz setlinecap
r))r�s r#�_linecap_cmdzRendererPS._linecap_cmdJs-���q��a�A�!�L�����!��M�*�*r%c��||jk7r5|jj|j|��|r||_yyyr)r�r�r�r)r"r�r	s   r#�set_linecapzRendererPS.set_linecapQs?���d�l�l�"��N�N� � ��!2�!2�7�!;�<��&����#r%c�
�|j�+|j\}}tj||�r||k(ry|jj	|�#t|�rdt
|��dt
|��d�nd�|r
||f|_yy)N�[z] z	 setdash
z
[] 0 setdash
)r��np�array_equalr�r�r�rt)r"�offset�seqr	�oldo�oldseqs      r#�set_linedashzRendererPS.set_linedashWs����=�=�$��=�=�L�D�&��~�~�c�6�*�t�v�~������� #��C��H� !��s�!3� 4�5!�!-�f�!5� 6�j�B�.�	/��#�S�M�D�M�r%c��||f|j|jfk7r5|jjd|�d|d�d��|r||_||_yyy)N�/rirk� selectfont
)r�r�r�r�)r"r�r�r	s    r#�set_fontzRendererPS.set_fontds[���h��D�M�M�4�=�=�#A�A��N�N� � �1�X�J�a����m�!L�M�� (��
� (��
��Br%c���d}||jvr|j|Sdt|j�z}tjd}|jdz}|j
j
d|d�d|d�d|d�d|d�d	|d
�d|jtj|�t�j|�d�
��d|d
�d|�d��||j|<|S)Nr�zH%dzhatch.linewidthzH  << /PatternType 1
     /PaintType 2
     /TilingType 2
     /BBox[0 0 rriz]
     /XStep z
     /YStep z(

     /PaintProc {
        pop
        r�z setlinewidth
F��simplifyz]
        gsave
        fill
        grestore
        stroke
     } bind
   >>
   matrix
   0 z translate
   makepattern
   /z
 exch def
)r�r�r�r�r�r�r��
_convert_pathr�hatchr�scale)r"r.�sidelenr�r��
pageheights      r#�create_hatchzRendererPS.create_hatchks�����D�M�M�!��=�=��'�'��s�4�=�=�)�)���L�L�!2�3�	��[�[�2�%�
������"���{�!�G�A�;�'
�
�Q�K�
�
�Q�K�	�
�1�
������J�J�u��x�z�'�'��0�5��B�C�C���^��	�F��-�	�0 $��
�
�e���r%c��|jS)z�
        Get the factor by which to magnify images passed to draw_image.
        Allows a backend to have images at a different resolution to other
        artists.
        )r�r!s r#�get_image_magnificationz"RendererPS.get_image_magnification�s���'�'�'r%Nc
��|r!dd|jdz|jdzf}nd}tj||||ddgd�d�j	d�S)NggR@�)r�r�r%r�sclTr�)r�r�rr�r�)r"r��	transform�clipr,s     r#r-zRendererPS._convert_path�sZ�����d�j�j�4�/����t�1C�D�D��D��&�&��)�T�8�T�
�-�t�5�5;�V�G�_�	Er%c
��g}|j�}|�3|jdtg|j�|j���z�|j�\}}|��|t
|�f}|jj|�}|�[dt|j�z}|jjd|�d|j||d���d��||j|<|j|�d��d	j|�S)
Nz%s clipbox
zc%dr'z {
Fr+z
clip
newpath
} bind def
r�r�)�get_clip_rectangler�rt�size�p0�
get_clip_path�idr��getr�r�r�r-rr)r"�gcr8�rectr��trfrd�custom_clip_cmds        r#�
_get_clip_cmdzRendererPS._get_clip_cmd�s�����$�$�&�����K�K���)K�t�y�y�)K�4�7�7�)K�K�L��$�$�&�	��c�����C��/�C�"�.�.�2�2�3�7�O��&�"'�#�d�.>�.>�*?�"?�����$�$�*�������D�#���.�/�0�&��)8�� � ��%��K�K�?�+�2�.�/��w�w�t�}�r%c��|jdd\}}d}|ddd�dd�dd�f}	|	j�jdd�}
|�!d}||jz}||jz}
n?dj	tt|j�j���}d	}d	}
|jjd
|j|��d|d�d|d�d|�d
|d�d|
d�d|d�d|d�d|d�d|d�d|d�d|d�d|�d|
�d��y)Nrzfalse 3 colorimage���rr����z1 0 0 1 0 0rig�?�gsave
r�z translate
[z	] concat
z scale
/DataString rz string def
z 8 [ z 0 0 -z 0 z5 ]
{
currentfile DataString readhexstring pop
} bind �

grestore
)�shape�tobytes�hexr�rrr�r��frozen�	to_valuesr�r�rD)r"r@r�y�imr7rcrb�imagecmd�data�hexdata�matrix�xscale�yscales              r#�
draw_imagezRendererPS.draw_image�sY���x�x���|���1�'���$�B�$��2�A�2�+����,�,�.�$�$�T�3�/����"�F���1�1�1�F���1�1�1�F��X�X�c�#�y�'7�'7�'9�'C�'C�'E�F�G�F��F��F������"����B�����1��Q�q��e����
���
�!�F�1�:�
�
�q�E���1��Q�q��e�5��1��V�A�a�5��A�a�5�)	�
�
���	�
�
�
	r%c��|duxr|j�du}|jxr|}|j||||��}|j|||�y)N�r8r,)�get_hatch_path�should_simplifyr-�_draw_ps)r"r@r�r7�rgbFacer8r,�pss        r#�	draw_pathzRendererPS.draw_path�sY���$��>�2�#4�#4�#6�$�#>���'�'�0�D��
�
�
��i�d�X�
�
N���
�
�b�"�g�&r%c�\�|j|�rdn&|d|dcxk(r|dk(rnnd|dznd|ddz}gd�}|j�}	|j�st|j	��dk(r|j�n|j	�d}
|	dkDxr|
dkD}|rp|j
d|	z�|j
|j|j���|j
|j|j���|j
|j||d	�
��|r;|r|j
d�|r|j|dg�|r|j
d
�|r|j
d�|jd
dg�|j|dd|jdz|jdzfd	��D]/\}}
t|�s�|dd\}}|j
d||fz��1dj!|�}|j#|||d	d	��y)Nrrrz
%1.3f setgrayz%1.3f %1.3f %1.3f setrgbcolorr)z/o {�gsave�newpath�	translatez%.1f setlinewidthFr+ra�fill�grestore�strokez
} bind defr�rY���z%g %g or��rdrf)r�
get_linewidth�get_forced_alphar��get_rgb�	get_alphar�r�
get_joinstyler�get_capstyler-�extend�
iter_segmentsr�r�rrr\)r"r@�marker_path�marker_transr��transr]�ps_color�ps_cmd�lw�alpharf�vertices�coderrOr^s                 r#�draw_markerszRendererPS.draw_markers�s���#�#�G�,�
��q�z�W�Q�Z�5�7�1�:�5�!�7�1�:�-�0�7�2�A�;�>�	�;��
�
�
�
���'�'�)�S�����->�!�-C������j�j�l�1�o�	��a��%�E�A�I����M�M�-��2�3��M�M�$�,�,�R�-=�-=�-?�@�A��M�M�$�+�+�B�O�O�,=�>�?��
�
�d�(�(��l�27�)�9�	:����
�
�g�&���
�
�x��0�1���
�
�j�)���M�M�(�#��
�
�z�<�0�1�"�0�0����D�J�J�r�M�4�;�;�r�>�:��1� �	2�N�H�d��8�}����}���1��
�
�i�1�a�&�0�1�
	2��Y�Y�v�
���
�
�b�"�g�E�%�
�@r%c��t|�dkDrt|dj�nd}|j|||||�}|d|zzdz|dz|zk}|s"tj||||||||||	|
|||
�Sg}t|j
|||��D]`\}\}}d|j|fz}|j||d��}|jjd|�d|�d	��|j|��b|j|||||||	|
|||
�D]#\}}}}}d
|||fz}|j|||��%|xjdz
c_y)Nrrrzp%d_%dFr+r'z {
newpath
translate
z
} bind def
z%g %g %sr)r�rx�_iter_collection_uses_per_pathr�draw_path_collection�	enumerate�_iter_collection_raw_pathsr�r-r�r�r��_iter_collectionr\)r"r@�master_transform�paths�all_transforms�offsets�offset_trans�
facecolors�
edgecolors�
linewidths�
linestyles�antialiaseds�urls�offset_position�len_path�
uses_per_path�should_do_optimization�
path_codes�ir�r7r��
path_bytes�xo�yo�path_id�gc0r]r^s                             r#r}zRendererPS.draw_path_collections���.1��Z�!�^�3�u�Q�x�(�(�)����;�;��>�7�J�
�D�
�
�q�=�(�(�1�,��1��
�/M�M�	�%��4�4��b�*�E�>���z�:��J��d��	!�
!��
�$-�d�.M�.M� �%��/9�%:�	$� �A� ��i��t�7�7��;�;�D��+�+�D�)�e�+�L�J��N�N� � �&������
�	"�
�
���d�#�	$�.2�-B�-B��J����J�
�J��d�O�.5�	,�)�B��G�S�'��r�2�w�/�/�B��M�M�"�c�7�+�	,�	
� � �A�%� r%)�mtextc
��|j|j��ryt|d�s*|jd�|j	||||||d|�y|j||d��\}}	}
|j
�}d|jz}d|j�ddz}
d	d
d�jtjdd
d�}||z}d|
�d|��}t|||
z
�}|jjd||||dz|fz�|jjd|�d|�d��|xjdz
c_y)Nr�z�The PS backend determines usetex status solely based on rcParams['text.usetex'] and does not support having usetex=True only for some elements; this element will thus be rendered as if usetex=False.F�TeX)�ismathz
psmarker%dz%1.3f,%1.3f,%1.3frz{\sffamily %s}z{\ttfamily %s})z
sans-serif�	monospacezfont.familyrz{\rmfamily %s}z\color[rgb]{z} z/\psfrag{%s}[bl][bl][1][%f]{\fontsize{%f}{%f}%s}g�?rHz	 moveto
(z)
show
grestore
r)rrk�hasattrr��	draw_text�get_text_width_height_descent�get_size_in_pointsr�r?r�r�rtr�r�r�r�)r"r@rrOr��prop�angler�rbrc�blr��thetextr��fontcmd�tex�poss                 r#�draw_texzRendererPS.draw_tex?sn������
�
��-���t�X�&����2�
3�

�N�N�2�q�!�Q��e�U�E�B���5�5�a��e�5�L���1�b��*�*�,������-��#�b�j�j�l�2�A�&6�6��!2� 1�3�36�3��|�|�M�2�1�5�7H�4J�	�
�a�K��',�a�0���1�a��d�#�������>����(�4�-��B>�
>�	?�	
�����"����	����	�	
�����r%c	�4�|j|j��ry|dk(r|j||||||�S|r|j||||||�Stj
dr�|j
|�}	d|j�z}
g}d}d}
g}|D]w}tjt|�dt|�d���}	|	j|�}|	j|
|�}|}
|||
zz
}|j||f�|||
zz
}�y|	j j#d	d
�j%d	�}|j||f��n
|j'|�}	|j(j+|	|�g}dx}}t-j.||	�D]�}|j0j j#d	d
�j%d	�}|j0|ur#|r|j|�|j0}|gg}|dj|j2|j0j5|j6�f���|r|j|�|j8|j��|D]{\}}|j;||j�d�d
j=d�|D��}|j>jAd|jC|��d
|d�d|d�d|d�d|�d���}y#t$rd}|	jd�}Y��@wxYw)Nr�r�g����MbP?r�uni�04X�question�?r�r�rFr�c3�6K�|]\}}|d�d|d�d����y�w)r�z 0 m /r�z
 glyphshowNr))rorr�s   r#rqz'RendererPS.draw_text.<locals>.<genexpr>�s-���� 9�$+�A�t�$%�Q�%�v�d�1�X�Z� @� 9�s�rHr�ri� translate
� rotate
rI)"rrkr��
draw_mathtextr�r��
_get_font_afmr�rr?r}�get_width_from_char_name�KeyError�get_width_char�get_kern_dist_from_namer�r��encoder��
_get_font_ttfr��trackr	�layout�	ft_objectrr��	glyph_idxr
r)rrr�r�rD)r"r@rrOr�r�r�r�r�r�r/�stream�thisx�	last_name�xs_namesr�r�r��kern�ps_name�	prev_font�curr_stream�itemr�s                        r#r�zRendererPS.draw_textgs"������
�
��-���U�?��=�=��Q��1�d�E�:�:���%�%�b�!�Q��4��?�?��<�<��$��%�%�d�+�D��D�3�3�5�5�E��F��E��I��H��
'�� �}�}�S��V�s�3�q�6�#�,�-?�@��5� �9�9�$�?�E��3�3�I�t�D�� �	�����%�������
�.�����&��
'��+�+���w�	�2�6�6�'�?�
��M�M�7�H�-�.��%�%�d�+�D��#�#�)�)�$��2��F�&*�*�I��%�,�,�Q��5�

���>�>�9�9�"�F�7�I�6�v�v�g����>�>��2�"��
�
�k�2� $���I�#*�B�-�K��A��%�%��V�V�T�^�^�:�:�4�>�>�J�K��

���
�
�k�*������
�
��%�!'�	��G�X��M�M�'�4�#:�#:�#<�e�D��i�i� 9�/7� 9�9�G��N�N� � �&����B�����1��Q�q��e���q�	�
��	�
�"�
�		��E �5�%�D� �/�/��4�E�5�s�K7�7L�Lc�P�|jjj|d|�\}}}	}
}|j|j	��|j
j
d|d�d|d�d|d�d��d}|
D]�\}
}}}}|jj|
|�|
j|f|k7r:|
j|f}|j
j
d|
j�d|�d	��t|
t�r|
jt|��n|
j|
j|��}|j
j
|d�d|d�d
|�d����|D].\}}}}|j
j
|�d|�d|�d|�d���0|j
j
d
�y)z-Draw the math text using matplotlib.mathtext.r�rHr�rir�r�Nr'r(z	 moveto
/z glyphshow
z
 rectfill
�	grestore
)�
_text2path�mathtext_parser�parser
rkr�r�r��track_glyphr��
isinstancer
�
get_name_charr�r�r�)r"r@rrOr�r�r�r�r��descent�glyphs�rects�lastfontr�r��num�ox�oy�
glyph_namerbrcs                     r#r�zRendererPS.draw_mathtext�s���
�O�O�+�+�1�1�!�R��>�	.��v�w��������
�
��%���������e�1�Q�q�E���Q�i�y�
"�	#���+1�	.�'�D�(�C��R��#�#�/�/��c�:��$�$�h�/�8�;��/�/��9�����$�$���,�,�-�Q�x�j�
�F�H�1;�4��0E��"�"�3�s�8�,��#�#�D�$7�$7��$<�=�
�
�N�N� � ��a�&��"�Q�� ��<�|�-�
.�	.�"�	B�L�B��A�q��N�N� � �B�4�q���A�a�S��!��K�!@�A�	B������\�*r%c�h�|j||jd�|jd�|�y)N)rrr)rrr)�draw_gouraud_triangles�reshape)r"r@�points�colorsrss     r#�draw_gouraud_trianglez RendererPS.draw_gouraud_triangle�s,���#�#�B����y�(A�$*�N�N�9�$=�u�	Fr%c
��t|�t|�k(sJ�|jdk(sJ�|jddk(sJ�|jddk(sJ�|jdk(sJ�|jddk(sJ�|jddk(sJ�|j}|j|d|dzdf�}|j	|�}|j|d|dzdf�}tj|d��dz
}tj|d��dz}	tjd|	|z
z�}
|\}}|	\}
}tj|d|dzgd	��
�}d|d<||z
|
z|d<|dd�dd�fd
z|d<|j�jdd�}|jjd|d�d|
d�d|d�d|d�d|�d��y)Nrrrrr)�axisil��))�flags�u1)r�z2>u4)r��3u1)�dtyper�r�g�o@r�r�rGz�gsave
<< /ShadingType 4
   /ColorSpace [/DeviceRGB]
   /BitsPerCoordinate 32
   /BitsPerComponent 8
   /BitsPerFlag 8
   /AntiAlias true
   /Decode [ r�riz  0 1 0 1 0 1 ]
   /DataSource <
z
>
>>
shfill
grestore
)r��ndimrJr�r7r�min�max�ceil�emptyrKrLr�r�)r"r@r�r�rsrJ�flat_points�flat_colors�
points_min�
points_max�factor�xmin�ymin�xmax�ymaxrRrSs                 r#r�z!RendererPS.draw_gouraud_triangles�s����6�{�c�&�k�)�)�)��{�{�a�����|�|�A��!�#�#�#��|�|�A��!�#�#�#��{�{�a�����|�|�A��!�#�#�#��|�|�A��!�#�#�#������n�n�e�A�h��q��&9�1�%=�>���o�o�k�2���n�n�e�A�h��q��&9�1�%=�>���V�V�K�a�0�G�<�
��V�V�K�a�0�G�<�
����+�*�z�*A�B�C���
��d��
��d��x�x��!�H�u�Q�x��J�L����W�
�%�
�2�f�<��X��$�Q����U�+�e�3��X���,�,�.�$�$�T�3�/�������"��1�X�Q�t�A�h�a��Q�x�q��a��1��	�
��	r%rhc��|jj}|j�dkDxr |j|j	��}|sd}|j|�rd}|j�}|rz|j
|j��|j|j��|j|j��|j|j��|s|r |j|j	�dd�|d�||j|��||j��|d�|r5|s|r|d�|j|ddddi�|d�|s|r|d	�|r@|j!|�}	|d�|d
|j#�ddz�|d|	z�|r|d�|d	�y)
at
        Emit the PostScript snippet *ps* with all the attributes from *gc*
        applied.  *ps* must consist of PostScript commands to construct a path.

        The *fill* and/or *stroke* kwargs can be set to False if the *ps*
        string already includes filling and/or stroking, in which case
        `_draw_ps` is just supplying properties and clipping.
        rFNrrHr�r	zfill
r�z	%f %f %f z%s setpattern fill grestore
zstroke
)r�r�rirrk�	get_hatchr
rrmrrnr%�
get_dashesr
rD�stripr2�get_hatch_color)
r"r^r@r]rdrfr��mightstroker.�
hatch_names
          r#r\zRendererPS._draw_ps�s������$�$���'�'�)�A�-�B�#�3�3�B�J�J�L�A�A�	���F�����(��D����������r�/�/�1�2����b�.�.�0�1����R�_�_�.�/��D���r�}�}��/��%��D�N�N�B�J�J�L��!�,�-�
�i��
�d� � ��$�%�
�b�h�h�j��
�d������i� ��D�N�N�G�B�Q�K�5�u�5��(�O����l�#���*�*�5�1�J��)���+�� 2� 2� 4�R�a� 8�8�9��1�J�>�?���*��
�l�r%)r�)T)FNr)#r&r'r(�__doc__r�_get_data_path�
_afm_font_dir�_use_afm_rc_namer$rr
r
�staticmethodrrrrr%r)r2r4r-rDr�rWr_rzr}r�r�r�r�r�r\�
__classcell__�rs@r#r�r��s`����
)�E�(�(��5�M�"��E�6�'�+��-��-�)��+��+�'�*�)� �D(�E��,����@�'��'��FJ�2A��2A�h�*&��*&�X�:>�%��%�N�D��D�L�+��+�4�F��F��+��+�Z15�T�1�1r%r�c�(�eZdZed�\ZZd�Zy)�_Orientationrc�4�|jdk(r|ddd�S|S)N�	landscaperF)r�)r"rJs  r#�swap_if_landscapez_Orientation.swap_if_landscape3s ��"�i�i�;�6�u�T�r�T�{�A�E�Ar%N)r&r'r(�range�portraitrrr)r%r#r�r�0s����(��H�i�Br%r�c����eZdZdZddd�Zd�Zejdd�ddd	d
�d��Zdd�d
�Z	dd�d�Z
ejed�Z
ejed�Z�fd�Z�xZS)�FigureCanvasPSr��
PostscriptzEncapsulated Postscript)r^�epsc��y)Nr^r)r!s r#�get_default_filetypez#FigureCanvasPS.get_default_filetype<s��r%z3.5rsNr)�metadata�	papertype�orientationc���|jj}d|j_i}	t|ttj
f�rCt
j|�j}
|
jdd�jd�|	d<|xsijddtj�d��|	d<t	jd�}|r7tjj!t#|��j%d	�nt'j(�|	d
<dj+d�|	j-�D��}	|�tj.d
}|j1�}t3j4dgt6�|��t3j8t:|j1���}tj.dr|j<n|j>}|||f||	||d�|��y)Nr�r�r��Title�CreatorzMatplotlib vz, https://matplotlib.org/�SOURCE_DATE_EPOCHz%a %b %d %H:%M:%S %Y�CreationDater�c3�2K�|]\}}d|�d|�����y�w)z%%z: Nr))ro�kr�s   r#rqz+FigureCanvasPS._print_ps.<locals>.<genexpr>Ws%����!<�"�a��b���2�a�S�M�!<�r�zps.papersize�auto)r)rr�)�dpi�dsc_commentsrr) �figurerr�r�r��PathLike�pathlibrr�r�r�r?r��__version__�getenv�datetime�utcfromtimestamp�int�strftime�time�ctimerrr`r��lowerr�
check_in_listr_�
check_getitemr��_print_figure_tex�
_print_figure)
r"�fmt�outfiler
rrrsr�rr�filename�source_date_epoch�printers
             r#�	_print_pszFigureCanvasPS._print_ps?s����k�k�o�o����������g��R�[�[�1�2��|�|�G�,�1�1�H������3�:�:�7�C�
��!�#+�>�r�"6�"6���3�?�?�+�+D�E�#G��Y���I�I�&9�:��!�
���.�.��%�&�
(�(0��1G�(H�����		�^�$�
�y�y�!<�&2�&8�&8�&:�!<�<�������^�4�I��O�O�%�	����F�/�Y�/�9�E��(�(��k�&7�&7�&9�;���l�l�=�1��)�)��%�%�	�	��W�	H�#�L�'�9�	H�@F�	Hr%��bbox_inches_restorec�H�������������|dk(�t|ttjf�st	|�std���jj�\���dk(rt�j��f����jt��\}}	tjdr>�|kDs�|	kDr4t�j��f����jt��\}}	d|�z
z�d|	�z
z��}
�}|
�jjjz}|�jjjz}
d��t j"ur||
|
|f\}
}}}
d|	z�z
�c��d�|
|||
f�t%��_t)���j&|�	��t+�j��|�|�
�}�jj-|�������������fd�}tjdr�t/�5}tj0j3|d�}t5|d
d��5}||�ddd�tjddk(rt7t8|�����n*tjddk(rt7t:|�����t=||�ddd�yt?j@|d
d��5}tC|�stEjFd�|�}||�ddd�y#1swY��xYw#1swYyxYw#1swYyxYw)a+
        Render the figure to a filesystem path or a file-like object.

        Parameters are as for `.print_figure`, except that *dsc_comments* is a
        all string containing Document Structuring Convention comments,
        generated from the *metadata* parameter to `.print_figure`.
        rz,outfile must be a path or a file-like objectr�ps.usedistillergB@rr��Z�r�r-c	�����rtd|��ntd�
�d�d|��t��d�	j�dt��d	�d
�d|��tt�}td|��t
jds"|t�jj�z
}td
|z|��td|��tdjt�|��t
jds��jjj�D]i\}}|s�	t
jd}t|�dkDrd}|j�|dk(r|jt||���]t|||��ktd|��td|���s
td|��td|��tdt���z|���rtd�z|��tdt�dz�dzd	d	�z|��t�
j j#�|��td|��td|���s
td|��|j�y)Nz%!PS-Adobe-3.0 EPSF-3.0)�filez%%!PS-Adobe-3.0
%%DocumentPaperSizes: z
%%Pages: 1
r�)�endr4z
%%Orientation: r�rz
%%EndComments
z
%%BeginPrologr�z/mpldict %d dict defz
mpldict beginzps.fonttype�r�rr5z%%EndPrologz%%Page: 1 1z%s translatez	%d rotatez
%s clipboxr��showpagez%%EOF)�printr��get_bbox_headerr��psDefsr�r�r��usedrrr`�flushr�r�r�rtr�r�)r��Ndictr�r��fonttyper�rr��is_epsrr�ps_renderer�rotationr"r�r�r�s     ������������r#�print_figure_implz7FigureCanvasPS._print_figure.<locals>.print_figure_impl�s*�����/�b�9��/�/8�k�:%�&��2�'�
�\�N�#$�$/�$4�$4�#5�R�$�T�*�1�-�.�/$�%��r�	
#���K�E��/��+��<�<��,���[�;�;�@�@�A�A���(�5�0�r�:��/��+��$�)�)�F�#�"�-��<�<��,�&�9�9�>�>�D�D�F�A�$�I�u� � �"�|�|�M�:�H��5�z�C�'�#%���H�H�J��1�}����!2�9�e�!D�E�*�9�e�R�@�A�
�%�b�!��-�b�)���m�"�-��/��+��.�<��B�#7�7�b�A���k�H�,�2�6��,��e�B�h��r�	�1�a�!H�H��
�
�$�.�.�)�)�+�"�5�
�%�b�!��*�2�&���g�B�'��H�H�Jr%�tmp.psrbr�r�N�ghostscript)�ptyper��xpdf)$r�r�r�rr�
ValueErrorr�get_size_inchesrgrr_r�r�r�r�r�r�rrr�r�r�drawrr�rrr��_try_distill�
gs_distill�xpdf_distillr�r�open_file_cmr�codecs�	getwriter)r"r'r(rrrrr.�paper_width�paper_height�llx�lly�urx�ury�rendererrBr�r�r�r4r�r�r?r@rAr�r�r�s`   ```             @@@@@@@@r#r&zFigureCanvasPS._print_figurehs���������7�S�"�+�+�$6�7�(��1��K�L�L����3�3�5�
��v����&��.�.��v��?�A�I�$/�$A�$A��i� �%"�!��\��<�<�)�*��{�"�f�|�&;�*� �2�2�E�6�?�C�E�	�,7�,I�,I��i�(�-*�)��\���u�,�
-��
���.�
/�������D�K�K�$�$�*�*�*���D�K�K�$�$�+�+�+�����,�0�0�0�!$�c�3��!3��C��c�3��,�&��+�R�F�B���H��S�#�s�#��!����!�������M��$��K�K����[� 3�5��	
������"�9	�9	�v�<�<�)�*�$�%�

?���'�'�,�,�v�x�8���'�3��;�*�r�%�b�)�*��<�<� 1�2�m�C� ��!(�&�	��N��\�\�"3�4��>� ��!(�&�	��N�,�W�g�>�

?�

?��#�#�G�S�9�E�
(��,�T�2�6�6�+�+�I�6�t�<�D�!�$�'�
(�
(�*�*��

?�

?��
(�
(�s1�/L�5	L�>A)L�/L�L		�L�L�L!c�&�|dk(}|jj�\}	}
d}d}|}
|}|
|jjjz}||jjjz}|
|||f}t�|_t|	|
|j|��}t|j|	|
|||��}|jj|�t�5}tj|d�}|jd|�dt|�d�dtt ��d	d
j#t ��dt%||��dt%|	d
z|
d
z��d|jj'��d�d��|t(j*ur
|
|	}
}	||
||f}|r-|j-|jj��\}}n|dk(rt/|	|
�}t0|\}}t3||j4|||j6�}t8j:ddk(st8j:drt=t>|||||��n+t8j:ddk(rt=t@|||||��tC||�ddd�y#1swYyxYw)a(
        If :rc:`text.usetex` is True, a temporary pair of tex/eps files
        are created to allow tex to manage the text layout via the PSFrags
        package. These files are processed to yield the final ps or eps file.

        The rest of the behavior is as for `._print_figure`.
        rrr2r-rCz%!PS-Adobe-3.0 EPSF-3.0
r�z&
%%EndComments
%%BeginProlog
/mpldict z dict def
mpldict begin
r�z
end
%%EndProlog
mpldict begin
r�r�z
 0 0 clipbox
z
end
showpage
r�r�rr0rDr�)rEr��rotatedrFN)"rrHr�r�r�rr�r�rrIrrr�
write_textr9r�r:rrrtr�r�rrrgr_�_convert_psfragsr�r�r�r�rJrKrLr�)r"r'r(rrrrr.r?r�r�r�r�rRrSrTrUr�r@rVr��tmppathrPrQ�psfrag_rotateds                         r#r%z FigureCanvasPS._print_figure_tex�s����������3�3�5�
��v�
��
�������D�K�K�$�$�*�*�*���D�K�K�$�$�+�+�+���S�#�s�#��!����!�������M��$�T�[�[�%*�F�C��9L�N��	
������"� �
!�4	;�V��l�l�6�8�4�G�����
������q���
��f�+�����������b�"����
�e�B�h��r�	�"�#�$����������$#�'
�
$�*�l�4�4�4� &��v���S�#�s�+��
�,7�,I�,I��K�K�/�/�1�-3�)��\���&� .�u�f� =�I�,5�i�,@�)��\�-���+�+�[�,�� � �"�N����.�/�=�@��|�|�M�2��Z�$�f�I�D�%3�5����/�0�F�:��\�$�f�I�D�%3�5�
)��'�:�i4	;�4	;�4	;�s
�FJ�Jr^rc�T��|jj�t�|�
�Sr)r�draw_without_renderingr�rI)r"rs �r#rIzFigureCanvasPS.drawLs������*�*�,��w�|�~�r%)r&r'r(�	fixed_dpi�	filetypesr	r�delete_parameterr,r&r%r��
partialmethod�print_ps�	print_epsrIr�r�s@r#rr7s�����I�#�1�3�I���T���5�&�)��T�z�&H�*�&H�V!%�G(�X!%�V;�p'�y�&�&�y�$�7�H�'�	�'�'�	�5�9�I��r%rc�F�ttj|�||||�Sr)rZrr)r��psfrags�
font_preamble�custom_preamblerPrQrs       r#�convert_psfragsriQs'������W��w��\�;�P�Pr%c	�L�tjdtjdtjj	d�ztjj	d�ztjj	d�zd||d�zzi�5t�j
ddj|�|d	k(rd
nd|j�j�d�zd
��}ddd�t�5}tjj|d�}tjdddd|gt�t!j"||�ddd�t%|�5}d|j'd�v}	ddd�|	S#1swY��xYw#1swY�>xYw#1swY	SxYw)aj
    When we want to use the LaTeX backend with postscript, we write PSFrag tags
    to a temporary postscript file, each one marking a position for LaTeX to
    render some text. convert_psfrags generates a LaTeX document containing the
    commands to convert those tags to text. LaTeX/dvips produces the postscript
    file that includes the actual text.
    ztext.latex.preambler��graphicxr�z:\geometry{papersize={%(width)sin,%(height)sin},margin=0in})r�r�zt
\begin{figure}
  \centering\leavevmode
  %(psfrags)s
  \includegraphics*[angle=%(angle)s]{%(epsfile)s}
\end{figure}r�rr1r)rfr��epsfile�
)r�NrC�dvipsz-qz-R0z-o�	Landscapei�)r��
rc_contextr��
texmanager�_usepackage_if_not_loadedr�make_dvirr�resolve�as_posixrr�r�r�_check_and_log_subprocessr�r�r�r��read)
r[rfrPrQr�dvifiler��psfiler�r\s
          r#rZrZXs���

���!��L�L�.�/��N�N�4�4�W�=�
>��N�N�4�4�Z�@�
A�
�N�N�4�4�X�>�
?�
J�#�|�<�
=�	
=��
���,�'�'�
� �9�9�W�-�*�k�9��q�"�?�?�,�5�5�7��

��(����.
�	�%�������f�h�/��
�'�'�
�d�E�4���9�4�	A����F�G�$�	%�
�g��6�"�$�����
�5��6���M���.%�%��6���s&�AF�9AF
�#F�F
�
F�F#c��	|t|�g|��i|��y#tj$r }tj	d|�Yd}~yd}~wwxYw)Nz%s.  Distillation step skipped.)r�r��ExecutableNotFoundErrorr�r�)�funcr[rsr��excs     r#rJrJ�sE��=��S��\�+�D�+�F�+���&�&�=����6��<�<��=�s��A�A�Ac
�J�|rd}nd|z}|dz}tjd}tjtjd�j
ddd|zd	|d
|z|gt�tj|�tj||�|rt|||��yy)
z�
    Use ghostscript's pswrite or epswrite device to distill a file.
    This yields smaller files without illegal encapsulated postscript
    operators. The output is low-level, converting text to outlines.
    �	-dEPSCropz-sPAPERSIZE=%sz.pszps.distiller.res�gsz-dBATCHz	-dNOPAUSEz-r%dz-sDEVICE=ps2writez-sOutputFile=%s�rXN)r�r�rrv�_get_executable_info�
executabler�r��remover�r��pstoeps)r�rrEr�rX�paper_optionryrs        r#rKrK�s����"��'�%�/��
�u�_�F�

�,�,�)�
*�C�	�#�#�	�	!�	!�$�	'�	2�	2�	�K��#��/B�	�(�6�1�7�	<�	
�	��I�I�g��
�K�K��� ��	���w�/�r%c���tjd�tjd�t�5}tj|d�}tj|d�}tjddddd	d
|rdnd|z||g	t�tjdd
dd||gt�tj||�ddd�|rt|�yy#1swY�xYw)a

    Use ghostscript's ps2pdf and xpdf's/poppler's pdftops to distill a file.
    This yields smaller files without illegal encapsulated postscript
    operators. This distiller is preferred, generating high-level postscript
    output that treats text as text.
    r��pdftopsztmp.pdfrC�ps2pdfz-dAutoFilterColorImages#falsez-dAutoFilterGrayImages#falsez-sAutoRotatePages#Nonez-sGrayImageFilter#FlateEncodez-sColorImageFilter#FlateEncoderz-sPAPERSIZE#%sz-paper�matchz-level2N)r�r�rrrrrvr�r�r�r�)r�rrEr�rXr��tmppdf�tmppss        r#rLrL�s������T�"����Y�'�	�	�$�����f�i�0�����V�X�.��	�'�'�
�
,�
+�
%�
,�
-��[�%5��%=�
�f�
� $�	%�	�'�'�
��'�9�f�e�D�d�	L����E�7�#�!$�"�����#$�$�s�B
C�C"c���|\}}}}|rd||zdfz}nd}d||tj|�tj|�fz}d||||fz}dj||g�|fS)zx
    Return a postscript header string for the given bbox lbrt=(l, b, r, t).
    Optionally, return rotate command.
    z%.2f %.2f translate
90 rotaterr�z%%%%BoundingBox: %d %d %d %dz)%%%%HiResBoundingBox: %.6f %.6f %.6f %.6fr�)rr�rr)	�lbrtrXr]rr��t�rotate�	bbox_info�hires_bbox_infos	         r#r9r9�s����J�A�q�!�Q��1�Q�q�S�!�H�<����.�!�Q�����
�B�G�G�A�J�1O�O�I�A�	�1�a��E��O��9�9�i��1�2�F�:�:r%c���|rt||��\}}nd\}}|dz}t|d�5}t|d�5}|j}|D]�}	|	jd�r&|d�|s�||j	d�d	z��:|	jd
�r.||	�|d�|r||j	d�d	z�n|r|	jd�r��||	���|D]6}	|	jd
�r	|d��|	jd�r�/||	��8	ddd�ddd�tj|�tj||�y#1swY�=xYw#1swY�AxYw)z�
    Convert the postscript to encapsulated postscript.  The bbox of
    the eps file will be replaced with the given *bbox* argument. If
    None, original bbox will be used.
    r�)NNz.epsr�r�s%!PSs%!PS-Adobe-3.0 EPSF-3.0
r��
s
%%EndCommentssp%%BeginProlog
save
countdictstack
mark
newpath
/showpage {} def
/setpagedevice {pop} def
%%EndProlog
%%Page 1 1
)s%%Bounds%%HiResBounds%%DocumentMedias%%Pagess%%EOFsJcleartomark
countdictstack
exch sub { end } repeat
restore
showpage
%%EOF
s%%PageBoundingBoxN)	r9r�r�rar�r�r�r�r�)
r�r�rXr�r�rl�epsh�tmphr��lines
          r#r�r��st���+�D�'�B��	�6�&��	�6����G�	
�g�t�	�)��d�7�D�&9�)�T��
�
���	�D����w�'��2�3���)�*�*�7�3�e�;�<����!1�2��d���&�'���&�-�-��0�5�8�9���$�/�/�+K�L���d��/	�6�	�D����x�(��!�"����!5�6���d��	�=)�)�V�I�I�g��
�K�K���!�Y)�)��)�)�s)�
E!�-E�%B3E�E!�E	�E!�!E*)
z/_d { bind def } bind defz/m { moveto } _dz/l { lineto } _dz/r { rlineto } _dz/c { curveto } _dz/cl { closepath } _dz/ce { closepath eofill } _dzO/box {
      m
      1 index 0 r
      0 exch r
      neg 0 r
      cl
    } _dz6/clipbox {
      box
      clip
      newpath
    } _dz/sc { setcachedevice } _dc��eZdZdZeZy)�
_BackendPSzLevel IIN)r&r'r(�backend_versionr�FigureCanvasr)r%r#r�r�Ts�� �O�!�Lr%r�)Fr*NF)F)NF)Sr�rNr�enumrr��ior�loggingr�rr�r��tempfilerr �numpyr�
matplotlibr�rrrr	�matplotlib._afmr
�matplotlib.backend_basesrrr
r�matplotlib.cbookrr�matplotlib.font_managerr�matplotlib.ft2fontrr�matplotlib._ttconvr�matplotlib._mathtext_datar�matplotlib.pathr�matplotlib.texmanagerr�matplotlib.transformsr�!matplotlib.backends.backend_mixedrr�r�	getLoggerr&r�r�r�ps_backend_helperr_rgrt�
deprecatedr�r�r�r�r��RendererPDFPSBaser�r�rrirZrJrKrLr9r��FigureManagerPSr:�exportr�r)r%r#�<module>r�sj���������	��	�
�'����8�8��A�A�I�,�5�0�/� �,�*�?���w����"��
����
$�%��
"�X�y�
"�
�i�
"�
�x�
"��>�
"��>�	
"�
�>�
"��>�

"��=�
"��<�
"��<�
"��<�
"��<�
"��<�
"��L�
"��>�
"��>�
"� �>�!
"�""�!� ����� �1
"�	�6�K������$F�G�
�H�
�
=� N5�b#�L�q��2�2�q�hB�4�B�W�%�W�t������P��P�.�b=�0�D�>;�$:"�z$��"
��J
���"��"��"r%

Youez - 2016 - github.com/yon3zu
LinuXploit