HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyo
�
:��Lc@ s�dZddlmZddlZddlZddlZddlZddlZddlZd�Z	yddl
mZWn!ek
r�ddlmZnXddl
mZddlmZddlmZmZmZdd	lmZdd
lmZddlmZmZmZmZddlmZm Z m!Z!m"Z"dd
l#m$Z$ddl%m&Z&ddl'm(Z(m)Z)ddl*m+Z+m,Z,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddl8m9Z9ddl:m;Z;ddl<Z=ddl>Z>ddl?Z?ye@Wn!eAk
rPddlBmCZ@nXejDjEd�rldZFndZFdZGdZHiddfd 6dd!fd"6dd#fd$6d%d&fd'6d(d%fd)6d*d(fd+6d,d*fd-6d.d,fd/6d0d.fd16d2d0fd36d4d2fd56d6d4fd76d8d9fd:6d;d8fd<6d=d>fd?6d@d=fdA6dBd@fdC6dDdBfdE6dFdDfdG6dHdFfdI6dJdHfdK6dLdJfdM6dNdLfdO6dPdNfdQ6dRdPfdS6ZIdT�ZJdU�ZKdV�ZLdW�ZMdX�ZNdYefdZ��YZOd[efd\��YZPd]�ZQd^efd_��YZRd`�ZSeTd eUeTda�ZVeTd eUeTdb�ZWeTdc�ZXdd�ZYeTde�ZZdfefdg��YZ[e[Z\dhdidjdkdldmdngZ]dS(osF
A PostScript backend, which can produce both PostScript .ps and .eps
i����(tdivisionNcC stjd�jjS(Ni(tsyst	_getframetf_codetco_name(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_fn_names(tmd5(tmkstemp(tStringIO(tverboset__version__trcParams(tGcf(tAFM(tRendererBasetGraphicsContextBasetFigureManagerBasetFigureCanvasBase(tis_string_liketget_realpath_and_stattis_writable_file_liketmaxdict(t
quad2cubic(tFigure(tfindfonttis_opentype_cff_font(tFT2FonttKERNING_DEFAULTtLOAD_NO_HINTING(tconvert_ttf_to_ps(tMathTextParser(t	uni2type1(tText(tPath(tAffine2D(tMixedModeRenderer(tSettwint&t;sLevel IIig!@itletteritlegalitledgerg�G�z�@@gH�z�gG@ta0g�p=
�c7@ta1g
ףp=�0@ta2g�z�Ga'@ta3g
ףp=� @ta4gR���Q@ta5g��Q��@ta6gH�z�G@ta7g��(\�@ta8gZd;�O�?gffffff@ta9gR���Q�?ta10gfffffFD@g)\���L@tb0g)\���<@tb1g��Q�E4@tb2g)\���,@tb3g���Q8$@tb4g�p=
ף@tb5g)\��(@tb6g�p=
ף@tb7g�G�z@tb8g)\��(�?tb9g)\��(�?tb10cC sztj�}|j�|j�xS|D]G}|jd�rBq'nt|\}}||kr'||kr'|Sq'WdSdS(NtlR+(t	papersizetkeystsorttreverset
startswith(twthRCtkeytpwtph((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_get_papertypePs


cC s^t|�r|St|�}||kr2t|�Sd|}|jd�}|jd�}|S(Ns%1.3ft0t.(Rtinttstrtrstrip(tvaltivalts((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_num_to_str[s

cG sdjtt|��S(Nt (tjointmapRU(targs((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_nums_to_strfscC sv|jdd�}|jdd�}|jdd�}|jdd�}|jd	d
�}tjdd�|�}|S(
sHQuote dangerous characters of S for use in a PostScript string constant.s\s\\t(s\(t)s\)t's\251t`s\301s[^ -~\n]cS sdt|j��S(Ns\%03o(tordtgroup(tx((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt<lambda>ps(treplacetretsub(RT((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytquote_ps_stringiscC s[|dkr|dkS|dkr&tSt|�t|�krBtStjtj||��S(s�
    seq1 and seq2 are either None or sequences or arrays
    Return True if both are None or both are seqs with identical
    elements
    N(tNonetFalsetlentnptalltruetequal(tseq1tseq2((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytseq_allequalts
t
RendererPScB s�eZdZed�Zed�Zdd�Zd�Zd�Zdd�Z	dd�Z
dd	�Zdd
�Zdd�Z
dd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdddd�Zdd�Zd�Zd�Zd�Zd,d,d,d�Zed,d�Zd �Z d,d!�Z!d,d"�Z"d#�Z#d$d%�Z$d&�Z%d'�Z&d(�Z'd)�Z(d*�Z)e*e*d,d+�Z+RS(-s�
    The renderer handles all the drawing primitives using a graphics
    context instance that controls the colors/styles.
    i2iHcC s�tj|�||_||_||_tdrGd|_g|_n||_d|_
d|_d|_d|_
d|_d|_d|_i|_|d|_i|_d|_i|_td�|_tjjtddd�|_dS(	s�
        Although postscript itself is dpi independent, we need to
        imform the image code about a requested dpi to generate high
        res images and them scale them before embeddin them
        stext.usetexigR@tPStdatapathtfontstafmN(Rt__init__twidththeightt	_pswriterRttextcnttpsfragtimagedpiRgtcolort	linewidthtlinejointlinecaptlinedashtfontnametfontsizet_hatchestimage_magnificationt_clip_pathst_path_collection_idtused_charactersRtmathtext_parsertostpathRWt
_afm_font_dir(tselfRvRwtpswriterR{((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRu�s.
			
										
				cC sat|j�\}}|jj||t�f�}|djg|D]}t|�^qD�dS(sDKeeps track of which characters are required from
        each font.iN(RtfnameR�t
setdefaulttsettupdateR_(R�tfontRTtrealpathtstat_keyR�Ra((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyttrack_characters�s	cC sVxO|j�D]A\}\}}|jj||t�f�}|dj|�q
WdS(Ni(titemsR�R�R�R�(R�totherR�R�tcharsetR�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytmerge_used_characters�s	icC s�|||f|jkr�||krG||krG|jjd|�n|jjd|||f�|r�|||f|_q�ndS(Ns%1.3f setgray
s%1.3f %1.3f %1.3f setrgbcolor
(R|Rxtwrite(R�trtgtbtstore((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt	set_color�scC s<||jkr8|jjd|�|r8||_q8ndS(Ns%1.3f setlinewidth
(R}RxR�(R�R}R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt
set_linewidth�scC s<||jkr8|jjd|�|r8||_q8ndS(Ns%d setlinejoin
(R~RxR�(R�R~R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytset_linejoin�scC s<||jkr8|jjd|�|r8||_q8ndS(Ns%d setlinecap
(RRxR�(R�RR�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytset_linecap�scC s�|jdk	r4|j\}}t||�r4dSn|dk	rut|�rudt|�|f}|jj|�n|jjd�|r�||f|_ndS(Ns[%s] %d setdash
s
[] 0 setdash
(R�RgRoRiRZRxR�(R�toffsettseqR�toldotoldseqRT((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytset_linedash�scC swtdrdS||f|j|jfkrsd||f}|jj|�|r^||_n|rs||_qsndS(Ns	ps.useafms%/%s findfont
%1.3f scalefont
setfont
(RR�R�RxR�(R�R�R�R�tout((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytset_font�s

cC s�d}|jj|�r#|j|Sdt|j�}|jjdt��|jj|jtj|�t	�j
d�dt��|jjdt��||j|<|S(NiHsH%ds�  << /PatternType 1
     /PaintType 2
     /TilingType 2
     /BBox[0 0 %(sidelen)d %(sidelen)d]
     /XStep %(sidelen)d
     /YStep %(sidelen)d

     /PaintProc {
        pop
        0 setlinewidth
gR@tsimplifysR          stroke
     } bind
   >>
   matrix
   makepattern
   /%(name)s exch def
(R�thas_keyRiRxR�tlocalst
_convert_pathR!thatchR"tscaleRh(R�R�tsidelentname((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytcreate_hatch�s		$
	
cC s|j|jfS(s4return the canvas width and height in display coords(RvRw(R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytget_canvas_width_heightscC s�tdrP|j�}|j�}|j||d|�\}}}|||fS|r�|jj|d|�\}	}
}}}
|	|
|fStdr|r�|dd!}n|j|�}|j|�\}}}}}|j�}d|}||9}||9}||9}|||fS|j|�}|j	|dd	t
�|j�\}}|d
}|d
}|j�}|d
}|||fS(sm
        get the width and height in display coords of the string s
        with FontPropertry prop

        stext.usetextrendereriHs	ps.useafmii����g����MbP?gtflagsgP@(
Rtget_texmanagertget_size_in_pointstget_text_width_height_descentR�tparset
_get_font_afmtget_str_bbox_and_descentt
_get_font_ttftset_textRtget_width_heighttget_descent(R�RTtproptismatht
texmanagerR�RGRHtdRvRwtdescentR�R�R�RAR�R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�s8

'









cC stS(s3return true if small y numbers are top for renderer(Rh(R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytflipy7scC s�t|�}|jj|�}|dkr�t|ddd|j�}|dkrotdddd|j�}n|jj|�}|dkr�tt|��}||j|<n||j|<n|S(NtfontextRtt	directoryt	Helvetica(thashtafmfontdtgetRgRR�R
tfile(R�R�RIR�R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�;scC s�t|�}|jj|�}|dkr�t|�}|jj|�}|dkrvtt|��}||j|<n||j|<n|j�|j�}|j	|d�|S(NgR@(
R�tfontdR�RgRRRPtclearR�tset_size(R�R�RIR�R�tsize((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�Js
cC s
|j�S(N(tas_rgba_str(R�tim((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_rgbaYscC st|j�\}}}tj|tj�}||df|_|dd�dd�dd�f}|||j�fS(Nii(R�Rjt
fromstringtuint8tshapettostring(R�R�RHRGRTtrgbatrgb((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_rgb\s
%g333333�?g�z�G��?g)\��(�?cC s�|j�}tj|dtj�}|d|ddf|_|jtj�}|dd�dd�df}|dd�dd�df}	|dd�dd�df}
|||	||
|jtj�}|d|d|j�fS(Niiii(R�RjR�R�R�tastypetfloat32R�(R�R�trctgctbctrgbatR�trgba_fR�R�R�tgray((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_grayds&i�cC sitj|�}t|�}g}xAtd||�D]-}t|||�}|j|||!�q4W|S(Ni(tbinasciitb2a_hexRitrangetmintappend(R�RTtchars_per_linetnhextlinestitlimit((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt
_hex_linesoscC s|jS(s�
        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�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytget_image_magnificationxscC stS(s@
        ps backend support arbitrary scaling of image.
        (tTrue(R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytoption_scale_image�scC sX|jr*|j|�\}}}d}n|j|�\}}}d}||||fS(Ntimagesfalse 3 colorimage(tis_grayscaleR�R�(R�R�RHRGtbitstimagecmd((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_get_image_h_w_bits_command�s		cC s�|j�|j|�\}}	}
}dj|j|
��}|dkrY|	|j}
n|}
|dkr{||j}n|}|dkr�d}ndjtt|j���}|j	d}|j
�}|j�\}}g}|dk	r)|j\}}}}|j
dt||||��n|dk	r[|j||�}|j
d|�ndj|�}dt�}|jj|�|j�dS(	sy
        Draw the Image instance into the current axes; x is the
        distance in pixels from the left hand side of the canvas and y
        is the distance from bottom

        dx, dy is the width and height of the image.  If a transform
        (which must be an affine transform) is given, x, y, dx, dy are
        interpreted as the coordinate of the transform.
        s
s1 0 0 1 0 0RViHs
%s clipboxs%ss�gsave
%(clip)s
[%(matrix)s] concat
%(x)s %(y)s translate
%(xscale)s %(yscale)s scale
/DataString %(w)s string def
%(w)s %(h)s 8 [ %(w)s 0 0 -%(h)s 0 %(h)s ]
{
currentfile DataString readhexstring pop
} bind %(imagecmd)s
%(hexlines)s
grestore
N(t
flipud_outR�RWR�RgR�RXRPt	to_valuesRwtget_clip_rectanglet
get_clip_pathtboundsR�RZt_get_clip_pathR�RxR�(R�R�RatyR�tdxtdyt	transformRHRGR�R�thexlinestxscaletyscaletmatrixtfightbboxtclippathtclippath_transtcliptclipxtclipytclipwtcliphtidtps((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt
draw_image�s4
	
#
c	C sgg}d}|r5dd|jd|jdf}nd}x|j|d|d|�D]�\}}|tjkr�|jdt|��n�|tjkr�|jdt|��n�|tj	krt
t|d�t|��}|jdt|d	��nH|tjkr+|jdt|��n|tj
krJ|jd
�n|}qWWdj|�}|S(NggR@R	R�s%g %g ms%g %g li����s%g %g %g %g %g %g citcls
(RgRvRwt
iter_segmentsR!tMOVETOR�ttupletLINETOtCURVE3RtlisttCURVE4t	CLOSEPOLYRW(	R�R�RR	R�Rtlast_pointstpointstcode((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR��s. 	
cC s�|jj||f�}|dkr�dt|j�}d|g}|j|j||dt��|jdddg�|jj	dj
|��||j||f<n|S(Nsc%xs/%s {R�R	tnewpaths} bind def
s
(R�R�RgRiR�R�RhtextendRxR�RW(R�Rtclippath_transformRtps_cmd((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR��s

c	C sb|dko|j�dk}|jo*|}|j||d|d|�}|j|||�dS(sI
        Draws a Path instance using the given affine transform.
        R	R�N(Rgtget_hatch_pathtshould_simplifyR�t_draw_ps(R�R�R�RtrgbFaceR	R�R((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt	draw_path�s
c	C shtr|jjd�n|jj}|rq|d|dkrd|d|dkrdd|d}qqd|}nddd	d
g}	|	j|j||dt��|r�|	jd|dd
g�n|	jdd
dg�xY|j|dt�D]B\}
}t|
�r�|
d\}}
|	jd||
f�q�q�Wdj	|	�}|j
|||dtdt�dS(s�
        Draw the markers defined by path at each of the positions in x
        and y.  path coordinates are points, x and y coords will be
        transformed by the transform
        s% draw_markers 
iiis
%1.3f setgrays%1.3f %1.3f %1.3f setrgbcolors/o {tgsaveRt	translateR�tfilltgrestoretstrokes
} bind defi����s%g %g os
N(tdebugPSRxR�R�R�RhRRRiRWR#(R�R�tmarker_pathtmarker_transR�ttransR$R�tps_colorR tverticesRRaR�R((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytdraw_markerss&(

"c
C s6|jj}
g}x�t|j|||��D]�\}\}}d|j|f}d|ddg}|j|j||dt��|jdg�|
dj	|��|j|�q.Wxg|j
|||||||	|
||�
D];\}}}}}d|||f}|j|||�q�W|jd	7_dS(
Nsp%x_%xs/%s {RR'R�s} bind def
s
s%g %g %si(RxR�t	enumeratet_iter_collection_raw_pathsR�R�R�RhRRWt_iter_collectionR#(R�R�tmaster_transformtpathstall_transformstoffsetstoffsetTranst
facecolorst
edgecolorst
linewidthst
linestylestantialiasedsturlsR�t
path_codesR�R�RR�R txotyotpath_idtgc0R$R((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytdraw_path_collection%s""	%sTeX!cC sD|j|||�\}}	}
|j�}d|j}d|j�d }
idd6dd6jtdd	�}||}d
|
|f}d}tdr�t||||
�}|jjd
||||d|f�n:t|||�}|jjd||||d|f�dt	�}|j
j|�|jd7_dS(s&
        draw a Text instance
        s
psmarker%ds%1.3f,%1.3f,%1.3fis{\sffamily %s}s
sans-serifs{\ttfamily %s}t	monospacesfont.familys{\rmfamily %s}s\color[rgb]{%s} %sistext.latex.previews/\psfrag{%s}[Bl][Bl][1][%f]{\fontsize{%f}{%f}%s}g�?s/\psfrag{%s}[bl][bl][1][%f]{\fontsize{%f}{%f}%s}s5gsave
%(pos)s moveto
(%(thetext)s)
show
grestore
    iN(R�R�Rytget_rgbR�RRZRzR�R�RxR�(R�R�RaR�RTR�tangleR�RGRHtblR�tthetextR|tfontcmdttextcorrtposR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytdraw_tex=s$




*'
cC s}|jj}tr|d�n|dkrG|j||||||�S|ri|j||||||�Stdr�|j|j��|j|�}	|	j	�}
|j
�}d|}d}
|	j|�d|}d}g}x�|D]�}t
jt|�d�}y|	j|�}Wn&tk
r@d}|	jd�}nX|dk	rb|	j||�}nd}|}|
||7}
|jd	|
||f�|
||7}
q�Wd
j|�}dt�}|jj|�n�|j|�}	|	j|ddt�|j|	|�|j|j��|j|	j�d|j
��|	j�}d}g}d}
|	j�d}x�|D]�}t|�}|j|�}|dkr�td�}d}d}n|	j|�}|	j |dt�}|dk	r|	j!||t"�}nd}|}|
|d7}
|jd	|
||f�|
|j#d7}
qtWd
j|�}dt�}|jj|�dS(s&
        draw a Text instance
        s% text
tTeXs	ps.useafmg����MbP?iitquestiont?s%f %f m /%s glyphshows
s|gsave
/%(fontname)s findfont
%(fontsize)s scalefont
setfont
%(x)f %(y)f translate
%(angle)f rotate
%(thetext)s
grestore
    R�iigP@s.notdefg�@sBgsave
%(x)f %(y)f translate
%(angle)f rotate
%(thetext)s
grestore
N(iiii($RxR�R+RLt
draw_mathtextRR�RGR�tget_fontnameR�R�RgRR�R_tget_width_from_char_nametKeyErrortget_width_chartget_kern_dist_from_nameR�RWR�R�R�RR�R�tget_sfnttget_charmapR�tget_glyph_namet	load_chartget_kerningRtlinearHoriAdvance(R�R�RaR�RTR�RHR�R�R�R�R�R�tthisxtthisyt	last_nameR�tcR�RvtkernRJRtcmaptlastgindtccodetgindtglyph((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt	draw_text`s~






 
	
cC st�S(N(tGraphicsContextPS(R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytnew_gc�scC s�tr|jjd�n|jj|d|�\}}}	}
}|j|�|j|j��|
j�}dt	�}
|jj|
�dS(s>
        Draw the math text using matplotlib.mathtext
        s% mathtext
iHsBgsave
%(x)f %(y)f translate
%(angle)f rotate
%(thetext)s
grestore
N(
R+RxR�R�R�R�R�RGtgetvalueR�(R�R�RaR�RTR�RHRvRwR�R�R�RJR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRS�s'

cC s,|j||jd�|jd�|�dS(Niiii(iii(iii(tdraw_gouraud_trianglestreshape(R�R�RtcolorsR.((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytdraw_gouraud_triangle�scC sd|j|�}|j}|j|d|ddf�}|j|d|ddf�}tj|dd�d}tj|dd�d}	td�|	|}
|\}}|	\}
}tj|d|dfdddddfd
d
dfg�}d|d	<|||
|d<|dd�dd�fd|d
<t|j	��}|j
jdt��dS(NiiiitaxisiI����tdtypeR�tu1Rs>u4Roig�o@s�
gsave
<< /ShadingType 4
   /ColorSpace [/DeviceRGB]
   /BitsPerCoordinate 32
   /BitsPerComponent 8
   /BitsPerFlag 8
   /AntiAlias true
   /Decode [ %(xmin)f %(xmax)f %(ymin)f %(ymax)f 0 1 0 1 0 1 ]
   /DataSource (%(stream)s)
>>
shfill
grestore
ii(sflagsRs(i(i(
RR�RnRjR�tmaxtfloattemptyRfR�RxR�R�(R�R�RRoR.R�tflat_pointstflat_colorst
points_mint
points_maxtfactortxmintymintxmaxtymaxt	streamarrtstream((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRm�s(		!!
$	
c
C s�|jj}tr-|r-|d|d�n|j�dkojt|j��dkpj|j�ddk}|ov|}|o�|dk	o�t|�dkp�|ddk}|r%|j|j��|j�}	|j	|	�|j
�}
|j|
�|j|j
��|j|j�d �n|d�|j�}|rs|j\}}
}}|d||||
f�n|j�\}}|r�|j||�}|d|�n||j��|d�|r|r�|d�n|jdd	|d �|d
�|r|d�qn|j�}|rl|j|�}|d�|d|j�d �|d
|�n|r|d�n|d�dS(sv
        Emit the PostScript sniplet '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.
        s% s
gisgsave
s %1.4g %1.4g %1.4g %1.4g clipbox
s%s
R�isfill
s	grestore
s/[/Pattern [/DeviceRGB]] setcolorspace %f %f %f s%s setcolor fill grestore
sstroke
N(RxR�R+t
get_linewidthRiRGRgR�t
get_joinstyleR�tget_capstyleR�R�t
get_dashesR�R�R�R�R�tstript	get_hatchR�(R�RR�R$R(R*tcommandR�tmightstroketjinttcinttcliprectRaR�RGRHRRRR�t
hatch_name((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR#sV."







N(,t__name__t
__module__t__doc__RR�R�RuR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RgRRhR�R�R%R1RERORiRkRSRpRmR�R#(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRp�sL"					(									
B	
"	#	g				/RjcB seZd�Zd�ZRS(cC s&idd6dd6dd6tj|�S(Nitbuttitroundit
projecting(RR�(R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�Ts
cC s&idd6dd6dd6tj|�S(NitmiteriR�itbevel(RR�(R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�Ys
(R�R�R�R�(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRjSs	cO s@|jdt�}|||�}t|�}t||�}|S(NtFigureClass(tpopRtFigureCanvasPStFigureManagerPS(tnumRYtkwargsR�tthisFigtcanvastmanager((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytnew_figure_manager_s
R�cB sseZeZd�Zidd6dd6Zd�Zd�Zd�Zd�Z	d	d
d
de
dd�Zd
�Z
RS(cC sdS(N((R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytdrawist
PostscriptRsEncapsulated PostscripttepscC sdS(NR((R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytget_default_filetypeoscO s|j|d||�S(NR(t	_print_ps(R�toutfileRYR�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytprint_psrscO s|j|d||�S(NR�(R�(R�R�RYR�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt	print_epsusc
O sT|jdtd�}|j�}|dkr1n4|tkretd|djtj��f��n|jdd�j�}|dkr�t}n!|dkr�t}ntd	��|j	j
d
�|jdd
�}|jdd
�}	|jdd
�}
tdr+|j||||	|
||||�n%|j||||	|
||||�dS(Nt	papertypesps.papersizetautos>%s is not a valid papertype. Use one                     of %ss, torientationtportraitt	landscapes-Orientation must be "portrait" or "landscape"iHtdpit	facecolorRGt	edgecolorstext.usetex(
R�RtlowerRBtRuntimeErrorRWRCR�Rhtfiguretset_dpit_print_figure_text
_print_figure(R�R�tformatRYR�R�R�tisLandscapeR{R�R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�}s0%		
	
	iHRGR�c	2
K s�|dk}
t}t|�r'|}n't|�rBd}t}ntd��t�\}
}tj|
d�}|j	j
�\}}|dkr�|r�t||�}q�t||�}n|r�t|\}}nt|\}}t
dr_|dkr_||ks||kr_|r:t||�}t|\}}q\t||�}t|\}}q_nd0||}d1||}|j	jj\}}}}|}|}||}||}d}|r�||||f\}}}}d|||}}d	}n||||f}|j	j�} |j	j�}!|j	j|�|j	j|�|	jd
t�}"|"r�dtfd��Y}#|#�|_nt�|_|	jd
d�}$|j|||jd|�}%t|j	||||%d
|$�}&|j	j|&�|"rdS|j	j| �|j	j|!�|
r5|dIJn
|dIJ|rV|d|IJn|dtdIJ|dtjtj��IJ|d|IJ|
s�|d|IJn|d|IJ|
s�|dIJn|dIJtt �}'|dIJt
ds|'t|%j!�7}'n|d|'IJ|dIJxDt D]<}(|(j"�}(x'|(j#d�D]}||j"�IJqLWq*Wt
dsPx�|%j!j$�D]�\})}*t|*�r�t%t&|)��}+|+j'�},g}-x0|*D](}.|,j|.�p�d}/|-j(|/�q�Wt
d }0t|-�d!krd"}0nt)|)�r3t*d#��qIt+|)||0|-�q�q�Wn|d$IJ|d%IJ|
sw|d&IJn|dIJ|d't,||�IJ|r�|d(|IJn|d)t,|d|ddd�IJ||jj-�IJ|d$IJ|d*IJ|
s|d+IJn|j.�t
dd,krDt/||
d-|d.|�n,t
dd/krpt0||
d-|d.|�n|r�t1|�}||j2�IJn?t1|d�tj3|�j4}1t5j6||�tj7||1�dS(2s)
        Render the figure to hardcopy.  Set the figure patch face and
        edge colors.  This is useful because some of the GUIs have a
        gray figure face color background and you'll probably want to
        override this on hardcopy

        If outfile is a string, it is interpreted as a file name.
        If the extension matches .ep* write encapsulated postscript,
        otherwise write a stand-alone PostScript file.

        If outfile is a file object, a stand-alone PostScript file is
        written into this file object.
        R�s,outfile must be a path or a file-like objectRGR�sps.usedistilleriHg�?iiZtdryrunt
NullWritercB seZd�ZRS(c_ sdS(N((R�tklR�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR��s(R�R�R�(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR��stbbox_inches_restoreR{Ns%!PS-Adobe-3.0 EPSF-3.0s%!PS-Adobe-3.0s	%%Title: s%%Creator: matplotlib version s$, http://matplotlib.sourceforge.net/s%%CreationDate: s%%Orientation: s%%DocumentPaperSizes: s%%%%BoundingBox: %d %d %d %ds
%%Pages: 1s
%%EndCommentss
%%BeginPrologs	ps.useafms/mpldict %d dict defs
mpldict begins
sps.fonttypei�i*syOpenType CFF fonts can not be saved using the internal Postscript backend at this time.
Consider using the Cairo backend.tends%%EndPrologs%%Page: 1 1s%s translates	%d rotates
%s clipboxtshowpages%%EOFtghostscripttptypeRtxpdfgB@gB@(8RhRRRgR�t
ValueErrorRR�tfdopenR�tget_size_inchesRLRBRRR�t
get_facecolort
get_edgecolort
set_facecolort
set_edgecolorR�tobjectRxRR�t_renderer_classR#R�R
ttimetctimeRitpsDefsR�R�tsplittvaluesRRPRZR�RR�RRZRltcloset
gs_distilltxpdf_distilltopentreadtstattst_modetshutiltmovetchmod(2R�R�R�R�R�R�R�R�R�R�tisEPSFtpassed_in_file_objectttitletfdttmpfiletfhRvRwtpaperHeightt
paperWidthRARBRAR�RGRHtllxtllyturxturytrotationRt
origfacecolort
origedgecolorR�R�t_bbox_inches_restoretps_rendererR�tNdictR�t
font_filenametcharsR�Rdt	glyph_idsRbRgtfonttypetmode((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR��s�		

				










	



%




c	-K sg|dk}
|}t�\}}
tj|d�}d|j_|jj�\}}d}d}|jjj\}}}}|}|}||}||}||||f}|jj�}|jj	�}|jj
|�|jj|�|	jdt
�}|r(dtfd��Y}|�|_nt�|_|	jdd
�} |j|||jd	|�}!t|j||||!d| �}"|jj|"�|r�d
S|jj
|�|jj|�|dIJ|r�|d|IJn|d
tdIJ|dtjtj��IJ|d|IJ|dIJtt�}#|dIJ|d|#IJ|dIJxDtD]<}$|$j�}$x'|$jd�D]}||j�IJq~Wq\W|dIJ|dIJ|dIJ|dt||�IJ|dt|d|ddd�IJ||jj�IJ|dIJ|dIJ|j�|rUt }||}}||||f}n|
r�|jj�\}%}&|r|&|%}%}&qn�t!||�}'|dkr�|'}t"|'\}%}&n[t"|\}%}&||%ks�||&kr|
rt"|'\}%}&t#j$d||'fd�n|!j%�}(|(j&�})|(j'�}*t(|
|!j)|)|*|%|&|�}+t*ddkr�t+|
|
d |d!|d"|+�ngt*dd#kr�t,|
|
d |d!|d"|+�n5t*d$r�t
r�q�t+|
|
d |d!|d"|+�nt-|t.�r$t.|
�}||j/�IJn?t0|d�tj1|�j2},t3j4|
|�tj5||,�d
S(%s�
        If text.usetex is True in rc, 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.
        R�RGiHiR�R�cB seZd�ZRS(c_ sdS(N((R�R�R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�rs(R�R�R�(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�qsR�R{Ns%!PS-Adobe-3.0 EPSF-3.0s	%%Title: s%%Creator: matplotlib version s$, http://matplotlib.sourceforge.net/s%%CreationDate: s%%%%BoundingBox: %d %d %d %ds
%%EndCommentss
%%BeginPrologs/mpldict %d dict defs
mpldict begins
R�s%%EndPrologs%s translates
%s clipboxR�R�sYYour figure is too big to fit on %s paper. %s     paper will be used to prevent clipping.thelpfulsps.usedistillerR�R�RtrotatedR�stext.usetex(6RR�R�R�R�R�RR�R�R�R�R�R�RhR�RxRR�RgR�R#R�R
R�R�RiR�R�R�RZRlR�R�RLRBR	treportR�tget_font_preambletget_custom_preambletconvert_psfragsRzRR�R�t
isinstanceR�R�R�R�R�R�R�R�(-R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RvRwRARBRAR�RGRHR�R�R�R�RR�R�R�R�R�R�R�R�R�R�R�ttemp_papertypeR�t
font_preambletcustom_preambletpsfrag_rotatedR�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�Ns�

		







%



		




N(R�R�RpR�R�t	filetypesR�R�R�R�RhRgR�R�(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�fs	

					�cC s5tjj|�d}|d}tj||�|d}	|d}
t|	d�}|d}|d}
|dkr|d	}nd}td
r�d}nd}d
|||||||dj|�|tjj|�df
}td
r�|j|j	d��n:y|j|�Wn&t
k
r8}tjdd��nX|j
�tjdkrodtjj|�d}nd}d|||	|
f}tj|d�tj|�}t|
�}|r�td|j���ntj|j�d�|j
�tj|
�d||tjj|
�dtjj|�d|
f}tj|d�tj|�}t|
�}|r�td||j���ntj|j�d�|j
�tj|
�tj|�tj|
|�dt|�jd�kr�t}nt}ts1x+tj|d�D]}tj|�qWn|S(sj
    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.
    is.epss.texs.outputRGs.dvis.psR�iZstext.latex.unicodes-\usepackage{ucs}
\usepackage[utf8x]{inputenc}tsE\documentclass{article}
%s
%s
%s
\usepackage[dvips, papersize={%sin,%sin}, body={%sin,%sin}, margin={0in,0in}]{geometry}
\usepackage{psfrag}
\usepackage[dvips]{graphicx}
\usepackage{color}
\pagestyle{empty}
\begin{document}
\begin{figure}
\centering
\leavevmode
%s
\includegraphics*[angle=%s]{%s}
\end{figure}
\end{document}
s
i����tutf8sbYou are using unicode and latex, but have not enabled the matplotlib 'text.latex.unicode' rcParam.R�twin32s%s &&s8%s cd "%s" && latex -interaction=nonstopmode "%s" > "%s"tdebugsYLaTeX was not able to process your file:
Here is the full report generated by LaTeX: 

%ss.%s cd "%s" && dvips -q -R0 -o "%s" "%s" > "%s"scdvips was not able to process the following file:
%s
Here is the full report generated by dvips: 

t	Landscapei�s.*(R�R�R�R�R�R�RRWR�tencodetUnicodeEncodeErrorR	R�R�Rtplatformt
splitdrivetsystemR�R�tremoveR�R�RhR+tglob(R�tpsfragsR�R�R�R�R�ttmpdirtepsfilet	latexfileR�tlatexhtdvifiletpsfileRHtunicode_preambleRTterrtprecmdR�texit_statusR�R�R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR��sx	




	
	)
	


	0


		c
C sd|}|d}|d}td}tjdkr@d}	nd}	d|	|||||f}
tj|
d	�tj|
�}t|�}|r�td
|j	���ntj|j	�d	�|j
�tj|�tj|�tj
||�|rt||d|�ndS(
s�
    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.
    s-sPAPERSIZE=%ss.pss.outputsps.distiller.resR�tgswin32ctgss[%s -dBATCH -dNOPAUSE -r%d -sDEVICE=pswrite %s -sOutputFile="%s"                 "%s" > "%s"R�scghostscript was not able to process your image.
Here is the full report generated by ghostscript:

R�N(RRRR	R�R�RR�R�R�R�RR�R�tpstoeps(
R�R�R�RR�tpaper_optionRR�R�tgs_exeR�RR�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�Os*



	


c
C s�|d}|d}|d}|r-d}n
d|}d||||f}	tjdkrq|	jdd	�}	ntj|	d
�tj|	�}
t|�}|
r�td|j	���ntj|j	�d
�|j
�tj|�d|||f}	tj|	d
�tj|	�}
t|�}|
rEtd
|j	���ntj|j	�d
�|j
�tj|�tj|�tj
||�|r�t|||�nx(tj|d�D]}tj|�q�WdS(s

    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.
    s.pdfs.pss.outputs	-dEPSCrops-sPAPERSIZE=%ssWps2pdf -dAutoFilterColorImages=false -sColorImageFilter=FlateEncode %s "%s" "%s" > "%s"R�t=t#R�sZps2pdf was not able to process your image.
\Here is the report generated by ghostscript:

s-pdftops -paper match -level2 "%s" "%s" > "%s"s\pdftops was not able to process your image.
Here is the full report generated by pdftops: 

s.*N(RRRcR	R�R�RR�R�R�R�RR�R�RR(
R�R�R�RR�tpdffileRR�RR�RR�R�((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�tsH


	





c	C s�|\}}}}|r/d||df}nd}d||tj|�tj|�f}d||||f}dj||g�|fS(sw
    return a postscript header stringfor the given bbox lbrt=(l, b, r, t).
    Optionally, return rotate command.
    s%.2f %.2f  translate
90 rotateiR�s%%%%BoundingBox: %d %d %d %ds)%%%%HiResBoundingBox: %.6f %.6f %.6f %.6fs
(RjtceilRW(	tlbrtR�RAR�R�tttrotatet	bbox_infothires_bbox_info((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytget_bbox_header�s(cC s|d}tjdkr"d}nd}d||f}tj|d�tj|�\}}}tj|j�d�|j�}tj|d�tjd	|�}	|	r�|	j	�}nt
d
|��g|j�dD]}
t|
�^q�\}}}
}|dkr;|d|d|
d|df\}}}
}nv||
d
}||d
}|d
|dd
}|d|dd
}||||||||f\}}}
}d||tj|
�tj|�f}d|||
|f}dj||g�S(s�
    Use ghostscript's bbox device to find the center of the bounding box. Return
    an appropriately sized bbox centered around that point. A bit of a hack.
    s.outputR�RRs'%s -dBATCH -dNOPAUSE -sDEVICE=bbox "%s"R�sdebug-annoyingR�s%%HiResBoundingBox: .*sVGhostscript was not able to extract a bounding box.Here is the Ghostscript output:

%si����iiiis%%%%BoundingBox: %d %d %d %ds)%%%%HiResBoundingBox: %.6f %.6f %.6f %.6fs
N(RRR	R�R�tpopen3R�RdtsearchR`R�R�RuRgRjRRW(R�RR�RR�tstdintstdouttstderrRt
bbox_foundR�RAR�R�RRaR�R�R�R ((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytget_bbox�s6
	

51.(c	C s+t|d|�\}}|d}t|d�}t|�}|j�}x|r`|jd�rx|dIJ||IJn�|jd�r|j|�|dIJ|dIJ|d	IJ|d
IJ|dIJ|dIJ|d
IJ|dIJ|dIJ|r||IJnPnL|jd�sQ|jd�sQ|jd�sQ|jd�rDn
|j|�|j�}qLW|j�}x�|r�|jd�r�|dIJ|dIJ|d	IJ|dIJ|dIJtddkr�|j�}q�n
|j|�|j�}qpW|j�|j�tj|�t	j
||�dS(s<
    Convert the postscript to encapsulated postscript.
    R�s.epsRGs%!PSs%!PS-Adobe-3.0 EPSF-3.0s
%%EndCommentss
%%BeginPrologtsavetcountdictstacktmarkRs/showpage {} defs/setpagedevice {pop} defs%%EndPrologs
%%Page 1 1s%%Bounds%%HiResBounds%%DocumentMedias%%Pagess	%%Trailertcleartomarksexch sub { end } repeattrestoresps.usedistillerR�N(R!R�treadlineRFR�RR�R�RR�R�(	R�RR�RRR
tepshttmphtline((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�s\
	













	








R�cB seZRS((R�R�(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR�%ss/m { moveto } bind defs/l { lineto } bind defs/r { rlineto } bind defs/c { curveto } bind defs/cl { closepath } bind defsU/box {
      m
      1 index 0 r
      0 exch r
      neg 0 r
      cl
    } bind defs</clipbox {
      box
      clip
      newpath
    } bind def(^R�t
__future__RRtmathR�R�RR�RthashlibRtImportErrorttempfileRt	cStringIORt
matplotlibR	R
Rtmatplotlib._pylab_helpersRtmatplotlib.afmR
tmatplotlib.backend_basesRRRRtmatplotlib.cbookRRRRtmatplotlib.mlabRtmatplotlib.figureRtmatplotlib.font_managerRRtmatplotlib.ft2fontRRRtmatplotlib.ttconvRtmatplotlib.mathtextRtmatplotlib._mathtext_dataRtmatplotlib.textR tmatplotlib.pathR!tmatplotlib.transformsR"t!matplotlib.backends.backend_mixedR#tnumpyRjR�RdR�t	NameErrortsetsR$RRFt	cmd_splittbackend_versionR+RBRLRURZRfRoRpRjR�R�R�RhRgR�R�R!R(RR�t
FigureManagerR�(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt<module>s�H	
""
	






















					���	�}	m%2	+A