• File: backend_ps.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyc
  • Date Modified: 07/22/2015 11:41 PM
  • File size: 50.05 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

:Lc@ sdZddlmZddlZddlZddlZddlZddlZddlZdZ	yddl
mZWn!ek
rddlmZnXddl
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@nXejDjEdrldZFndZFdZGdZHiddfd 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@fdC6dDdBfdE6dFdDfdG6dHdFfdI6dJdHfdK6dLdJfdM6dNdLfdO6dPdNfdQ6dRdPfdS6ZIdTZJdUZKdVZLdWZMdXZNdYefdZYZOd[efd\YZPd]ZQd^efd_YZRd`ZSeTd eUeTdaZVeTd eUeTdbZWeTdcZXddZYeTdeZZdfefdgYZ[e[Z\dhdidjdkdldmdngZ]dS(osF
A PostScript backend, which can produce both PostScript .ps and .eps
i(tdivisionNcC stjdjjS(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!@itletteritlegalitledgergGz@@gHzgG@ta0gp=
c7@ta1g
ףp=0@ta2gzGa'@ta3g
ףp= @ta4gRQ@ta5gQ@ta6gHzG@ta7g(\@ta8gZd;O?gffffff@ta9gRQ?ta10gfffffFD@g)\L@tb0g)\<@tb1gQE4@tb2g)\,@tb3gQ8$@tb4gp=
ף@tb5g)\(@tb6gp=
ף@tb7gGz@tb8g)\(?tb9g)\(?tb10cC sztj}|j|jxS|D]G}|jdrBq'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|jS(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 seZdZedZedZddZdZdZddZ	ddZ
dd	Zdd
ZddZ
ddZd
ZdZdZdZdZdZdZdZddddZddZdZdZdZd,d,d,dZed,dZd 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 stj|||_||_||_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.pyRus.
			
										
				cC sat|j\}}|jj||tf}|djg|D]}t|^qDdS(sDKeeps track of which characters are required from
        each font.iN(RtfnameRt
setdefaulttsettupdateR_(RtfontRTtrealpathtstat_keyRRa((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyttrack_characterss	cC sVxO|jD]A\}\}}|jj||tf}|dj|q
WdS(Ni(titemsRRRR(RtotherRRtcharsetR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytmerge_used_characterss	icC s|||f|jkr||krG||krG|jjd|n|jjd|||f|r|||f|_qndS(Ns%1.3f setgray
s%1.3f %1.3f %1.3f setrgbcolor
(R|Rxtwrite(Rtrtgtbtstore((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt	set_colorscC s<||jkr8|jjd||r8||_q8ndS(Ns%1.3f setlinewidth
(R}RxR(RR}R((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt
set_linewidthscC s<||jkr8|jjd||r8||_q8ndS(Ns%d setlinejoin
(R~RxR(RR~R((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytset_linejoinscC s<||jkr8|jjd||r8||_q8ndS(Ns%d setlinecap
(RRxR(RRR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytset_linecapscC s|jdk	r4|j\}}t||r4dSn|dk	rut|rudt||f}|jj|n|jjd|r||f|_ndS(Ns[%s] %d setdash
s
[] 0 setdash
(RRgRoRiRZRxR(RtoffsettseqRtoldotoldseqRT((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytset_linedashscC swtdrdS||f|j|jfkrsd||f}|jj||r^||_n|rs||_qsndS(Ns	ps.useafms%/%s findfont
%1.3f scalefont
setfont
(RRRRxR(RRRRtout((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytset_fonts

cC sd}|jj|r#|j|Sdt|j}|jjdt|jj|jtj|t	j
ddt|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
(Rthas_keyRiRxRtlocalst
_convert_pathR!thatchR"tscaleRh(RRtsidelentname((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytcreate_hatchs		$
	
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 stdrP|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.useafmiigMbP?gtflagsgP@(
Rtget_texmanagertget_size_in_pointstget_text_width_height_descentRtparset
_get_font_afmtget_str_bbox_and_descentt
_get_font_ttftset_textRtget_width_heighttget_descent(RRTtproptismatht
texmanagerRRGRHtdRvRwtdescentRRRRARR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRs8

'









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 st|}|jj|}|dkrt|ddd|j}|dkrotdddd|j}n|jj|}|dkrtt|}||j|<n||j|<n|S(NtfontextRtt	directoryt	Helvetica(thashtafmfontdtgetRgRRR
tfile(RRRIRR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR;scC st|}|jj|}|dkrt|}|jj|}|dkrvtt|}||j|<n||j|<n|j|j}|j	|d|S(NgR@(
RtfontdRRgRRRPtclearRtset_size(RRRIRRtsize((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRJs
cC s
|jS(N(tas_rgba_str(Rtim((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_rgbaYscC st|j\}}}tj|tj}||df|_|ddddddf}|||jfS(Nii(RRjt
fromstringtuint8tshapettostring(RRRHRGRTtrgbatrgb((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_rgb\s
%g333333?gzG?g)\(?cC s|j}tj|dtj}|d|ddf|_|jtj}|dddddf}|dddddf}	|dddddf}
|||	||
|jtj}|d|d|jfS(Niiii(RRjRRRtastypetfloat32R(RRtrctgctbctrgbatRtrgba_fRRRtgray((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_grayds&icC sitj|}t|}g}xAtd||D]-}t|||}|j|||!q4W|S(Ni(tbinasciitb2a_hexRitrangetmintappend(RRTtchars_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_imagescC sX|jr*|j|\}}}d}n|j|\}}}d}||||fS(Ntimagesfalse 3 colorimage(tis_grayscaleRR(RRRHRGtbitstimagecmd((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt_get_image_h_w_bits_commands		cC s|j|j|\}}	}
}dj|j|
}|dkrY|	|j}
n|}
|dkr{||j}n|}|dkrd}ndjtt|j}|j	d}|j
}|j\}}g}|dk	r)|j\}}}}|j
dt||||n|dk	r[|j||}|j
d|ndj|}dt}|jj||jdS(	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%ssgsave
%(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_outRRWRRgRRXRPt	to_valuesRwtget_clip_rectanglet
get_clip_pathtboundsRRZt_get_clip_pathRRxR(RRRatyRtdxtdyt	transformRHRGRRthexlinestxscaletyscaletmatrixtfightbboxtclippathtclippath_transtcliptclipxtclipytclipwtcliphtidtps((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt
draw_images4
	
#
c	C sgg}d}|r5dd|jd|jdf}nd}x|j|d|d|D]\}}|tjkr|jdt|n|tjkr|jdt|n|tj	krt
t|dt|}|jdt|d	nH|tjkr+|jdt|n|tj
krJ|jd
n|}qWWdj|}|S(NggR@R	Rs%g %g ms%g %g lis%g %g %g %g %g %g citcls
(RgRvRwt
iter_segmentsR!tMOVETORttupletLINETOtCURVE3RtlisttCURVE4t	CLOSEPOLYRW(	RRRR	RRtlast_pointstpointstcode((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRs. 	
cC s|jj||f}|dkrdt|j}d|g}|j|j||dt|jdddg|jj	dj
|||j||f<n|S(Nsc%xs/%s {RR	tnewpaths} bind def
s
(RRRgRiRRRhtextendRxRRW(RRtclippath_transformRtps_cmd((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRs

c	C sb|dko|jdk}|jo*|}|j||d|d|}|j|||dS(sI
        Draws a Path instance using the given affine transform.
        R	RN(Rgtget_hatch_pathtshould_simplifyRt_draw_ps(RRRRtrgbFaceR	RR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt	draw_paths
c	C shtr|jjdn|jj}|rq|d|dkrd|d|dkrdd|d}qqd|}nddd	d
g}	|	j|j||dt|r|	jd|dd
gn|	jdd
dgxY|j|dtD]B\}
}t|
r|
d\}}
|	jd||
fqqWdj	|	}|j
|||dtdtdS(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	translateRtfilltgrestoretstrokes
} bind defis%g %g os
N(tdebugPSRxRRRRhRRRiRWR#(RRtmarker_pathtmarker_transRttransR$Rtps_colorR tverticesRRaRR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytdraw_markerss&(

"c
C s6|jj}
g}xt|j|||D]\}\}}d|j|f}d|ddg}|j|j||dt|jdg|
dj	||j|q.Wxg|j
|||||||	|
||
D];\}}}}}d|||f}|j|||qW|jd	7_dS(
Nsp%x_%xs/%s {RR'Rs} bind def
s
s%g %g %si(RxRt	enumeratet_iter_collection_raw_pathsRRRRhRRWt_iter_collectionR#(RRtmaster_transformtpathstall_transformstoffsetstoffsetTranst
facecolorst
edgecolorst
linewidthst
linestylestantialiasedsturlsRt
path_codesRRRRR 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|jd }
idd6dd6jtdd	}||}d
|
|f}d}tdrt||||
}|jjd
||||d|fn:t|||}|jjd||||d|fdt	}|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(RRRytget_rgbRRRZRzRRRxR(RRRaRRTRtangleRRGRHtblRtthetextR|tfontcmdttextcorrtposR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytdraw_tex=s$




*'
cC s}|jj}tr|dn|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}
qWd
j|}dt}|jj|n|j|}	|	j|ddt|j|	||j|j|j|	jd|j
|	j}d}g}d}
|	jd}x|D]}t|}|j|}|dkrtd}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.useafmgMbP?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
    RiigP@s.notdefg@sBgsave
%(x)f %(y)f translate
%(angle)f rotate
%(thetext)s
grestore
N(iiii($RxRR+RLt
draw_mathtextRRRGRtget_fontnameRRRgRRR_tget_width_from_char_nametKeyErrortget_width_chartget_kern_dist_from_nameRRWRRRRRRtget_sfnttget_charmapRtget_glyph_namet	load_chartget_kerningRtlinearHoriAdvance(RRRaRRTRRHRRRRRRtthisxtthisyt	last_nameRtcRRvtkernRJRtcmaptlastgindtccodetgindtglyph((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt	draw_text`s~






 
	
cC stS(N(tGraphicsContextPS(R((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytnew_gcscC str|jjdn|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+RxRRRRRRGtgetvalueR(RRRaRRTRRHRvRwRRRRJR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRSs'

cC s,|j||jd|jd|dS(Niiii(iii(iii(tdraw_gouraud_trianglestreshape(RRRtcolorsR.((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytdraw_gouraud_trianglescC st|t|kst|jdks3t|jddksLt|jddkset|jdkszt|jddkst|jddkst|j|}|j}|j|d|ddf}|j|d|ddf}tj|ddd}tj|ddd}	t	d|	|}
|\}}|	\}
}tj
|d|dfd	ddd
dfdddfg}d|d
<|||
|d<|ddddfd|d<t|j}|j
jdtdS(NiiiiitaxisiItdtypeRtu1Rs>u4Rogo@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(RitAssertionErrortndimRRRnRjRtmaxtfloattemptyRfRRxRR(RRRRoR.Rtflat_pointstflat_colorst
points_mint
points_maxtfactortxmintymintxmaxtymaxt	streamarrtstream((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRms6	!!
$	
c
C s|jj}tr-|r-|d|dn|jdkojt|jdkpj|jddk}|ov|}|o|dk	ot|dkp|ddk}|r%|j|j|j}	|j	|	|j
}
|j|
|j|j
|j|jd n|d|j}|rs|j\}}
}}|d||||
fn|j\}}|r|j||}|d|n||j|d|r|r|dn|jdd	|d |d
|r|dqn|j}|rl|j|}|d|d|jd |d
|n|r|dn|ddS(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
Risfill
s	grestore
s/[/Pattern [/DeviceRGB]] setcolorspace %f %f %f s%s setcolor fill grestore
sstroke
N(RxRR+t
get_linewidthRiRGRgRt
get_joinstyleRtget_capstyleRRt
get_dashesRRRRRtstript	get_hatchR(RRRR$R(R*tcommandRtmightstroketjinttcinttcliprectRaRRGRHRRRRt
hatch_name((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR#sV."







N(,t__name__t
__module__t__doc__RRRRuRRRRRRRRRRRRRRRRRRRRRRgRRhRRR%R1RERORiRkRSRpRmRR#(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRpsL"					(									
B	
"	#	g				/RjcB seZdZdZRS(cC s&idd6dd6dd6tj|S(Nitbuttitroundit
projecting(RR(R((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRTs
cC s&idd6dd6dd6tj|S(NitmiteriRitbevel(RR(R((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRYs
(RRRR(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRjSs	cO s@|jdt}|||}t|}t||}|S(NtFigureClass(tpopRtFigureCanvasPStFigureManagerPS(tnumRYtkwargsRtthisFigtcanvastmanager((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytnew_figure_manager_s
RcB sseZeZdZidd6dd6ZdZdZdZdZ	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(RtoutfileRYR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytprint_psrscO s|j|d||S(NR(R(RRRYR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt	print_epsusc
O sT|jdtd}|j}|dkr1n4|tkretd|djtjfn|jddj}|dkrt}n!|dkrt}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(
RRtlowerRBtRuntimeErrorRWRCRRhtfiguretset_dpit_print_figure_text
_print_figure(RRtformatRYRRRtisLandscapeR{RR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyR}s0%		
	
	iHRGRc	2
K s|dk}
t}t|r'|}n't|rBd}t}ntdt\}
}tj|
d}|j	j
\}}|dkr|rt||}qt||}n|rt|\}}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}"|"rdtfdY}#|#|_nt|_|	jd
d}$|j|||jd|}%t|j	||||%d
|$}&|j	j|&|"rdS|j	j| |j	j|!|
r5|dIJn
|dIJ|rV|d|IJn|dtdIJ|dtjtjIJ|d|IJ|
s|d|IJn|d|IJ|
s|dIJn|dIJtt }'|dIJt
ds|'t|%j!7}'n|d|'IJ|dIJxDt D]<}(|(j"}(x'|(j#dD]}||j"IJqLWq*Wt
dsPx|%j!j$D]\})}*t|*rt%t&|)}+|+j'},g}-x0|*D](}.|,j|.pd}/|-j(|/qWt
d }0t|-d!krd"}0nt)|)r3t*d#qIt+|)||0|-qqWn|d$IJ|d%IJ|
sw|d&IJn|dIJ|d't,||IJ|r|d(|IJn|d)t,|d|dddIJ||jj-IJ|d$IJ|d*IJ|
s|d+IJn|j.t
dd,krDt/||
d-|d.|n,t
dd/krpt0||
d-|d.|n|rt1|}||j2IJn?t1|dtj3|j4}1t5j6||tj7||1dS(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.
        Rs,outfile must be a path or a file-like objectRGRsps.usedistilleriHg?iiZtdryrunt
NullWritercB seZdZRS(c_ sdS(N((RtklR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRs(RRR(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRstbbox_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.fonttypeii*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@(8RhRRRgRt
ValueErrorRRtfdopenRtget_size_inchesRLRBRRRt
get_facecolort
get_edgecolort
set_facecolort
set_edgecolorRtobjectRxRRt_renderer_classR#RR
ttimetctimeRitpsDefsRRtsplittvaluesRRPRZRRRRRZRltcloset
gs_distilltxpdf_distilltopentreadtstattst_modetshutiltmovetchmod(2RRRRRRRRRRtisEPSFtpassed_in_file_objectttitletfdttmpfiletfhRvRwtpaperHeightt
paperWidthRARBRARRGRHtllxtllyturxturytrotationRt
origfacecolort
origedgecolorRRt_bbox_inches_restoretps_rendererRtNdictRt
font_filenametcharsRRdt	glyph_idsRbRgtfonttypetmode((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRs		

				










	



%




c	-K sg|dk}
|}t\}}
tj|d}d|j_|jj\}}d}d}|jjj\}}}}|}|}||}||}||||f}|jj}|jj	}|jj
||jj||	jdt
}|r(dtfdY}||_nt|_|	jdd
} |j|||jd	|}!t|j||||!d| }"|jj|"|rd
S|jj
||jj||dIJ|r|d|IJn|d
tdIJ|dtjtjIJ|d|IJ|dIJtt}#|dIJ|d|#IJ|dIJxDtD]<}$|$j}$x'|$jdD]}||jIJq~Wq\W|dIJ|dIJ|dIJ|dt||IJ|dt|d|dddIJ||jjIJ|dIJ|dIJ|j|rUt }||}}||||f}n|
r|jj\}%}&|r|&|%}%}&qnt!||}'|dkr|'}t"|'\}%}&n[t"|\}%}&||%ks||&kr|
rt"|'\}%}&t#j$d||'fdn|!j%}(|(j&})|(j'}*t(|
|!j)|)|*|%|&|}+t*ddkrt+|
|
d |d!|d"|+ngt*dd#krt,|
|
d |d!|d"|+n5t*d$rt
rqt+|
|
d |d!|d"|+nt-|t.r$t.|
}||j/IJn?t0|dtj1|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.
        RRGiHiRRcB seZdZRS(c_ sdS(N((RRR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRrs(RRR(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRqsRR{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
Rs%%EndPrologs%s translates
%s clipboxRRsYYour figure is too big to fit on %s paper. %s     paper will be used to prevent clipping.thelpfulsps.usedistillerRRRtrotatedRstext.usetex(6RRRRRRRRRRRRRRhRRxRRRgRR#RR
RRRiRRRRZRlRRRLRBR	treportRtget_font_preambletget_custom_preambletconvert_psfragsRzRRRt
isinstanceRRRRRRRR(-RRRRRRRRRRRRRRRRvRwRARBRARRGRHRRRRRRRRRRRRRRRRttemp_papertypeRt
font_preambletcustom_preambletpsfrag_rotatedR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRNs

		







%



		




N(RRRpRRt	filetypesRRRRRhRgRR(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRfs	

					cC s5tjj|d}|d}tj|||d}	|d}
t|	d}|d}|d}
|dkr|d	}nd}td
rd}nd}d
|||||||dj||tjj|df
}td
r|j|j	dn:y|j|Wn&t
k
r8}tjddnX|j
tjdkrodtjj|d}nd}d|||	|
f}tj|dtj|}t|
}|rtd|jntj|jd|j
tj|
d||tjj|
dtjj|d|
f}tj|dtj|}t|
}|rtd||jntj|jd|j
tj|
tj|tj|
|dt|jdkrt}nt}ts1x+tj|dD]}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.psRiZstext.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
itutf8sbYou are using unicode and latex, but have not enabled the matplotlib 'text.latex.unicode' rcParam.Rtwin32s%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	Landscapeis.*(RRRRRRRRWRtencodetUnicodeEncodeErrorR	RRRtplatformt
splitdrivetsystemRRtremoveRRRhR+tglob(RtpsfragsRRRRRttmpdirtepsfilet	latexfileRtlatexhtdvifiletpsfileRHtunicode_preambleRTterrtprecmdRtexit_statusRRR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRsx	




	
	)
	


	0


		c
C sd|}|d}|d}td}tjdkr@d}	nd}	d|	|||||f}
tj|
d	tj|
}t|}|rtd
|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.resRtgswin32ctgss[%s -dBATCH -dNOPAUSE -r%d -sDEVICE=pswrite %s -sOutputFile="%s"                 "%s" > "%s"Rscghostscript was not able to process your image.
Here is the full report generated by ghostscript:

RN(RRRR	RRRRRRRRRRtpstoeps(
RRRRRtpaper_optionRRRtgs_exeRRR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyROs*



	


c
C s|d}|d}|d}|r-d}n
d|}d||||f}	tjdkrq|	jdd	}	ntj|	d
tj|	}
t|}|
rtd|j	ntj|j	d
|j
tj|d|||f}	tj|	d
tj|	}
t|}|
rEtd
|j	ntj|j	d
|j
tj|tj|tj
|||rt|||nx(tj|dD]}tj|qWdS(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"Rt=t#RsZps2pdf 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	RRRRRRRRRRRR	(
RRRRRtpdffileRRRRRRR((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRtsH


	





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 rotateiRs%%%%BoundingBox: %d %d %d %ds)%%%%HiResBoundingBox: %.6f %.6f %.6f %.6fs
(RjtceilRW(	tlbrtRRARRtttrotatet	bbox_infothires_bbox_info((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytget_bbox_headers(cC s|d}tjdkr"d}nd}d||f}tj|dtj|\}}}tj|jd|j}tj|dtjd	|}	|	r|	j	}nt
d
|g|jdD]}
t|
^q\}}}
}|dkr;|d|d|
d|df\}}}
}nv||
d
}||d
}|d
|dd
}|d|dd
}||||||||f\}}}
}d||tj|
tj|f}d|||
|f}dj||gS(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.outputRRRs'%s -dBATCH -dNOPAUSE -sDEVICE=bbox "%s"Rsdebug-annoyingRs%%HiResBoundingBox: .*sVGhostscript was not able to extract a bounding box.Here is the Ghostscript output:

%siiiiis%%%%BoundingBox: %d %d %d %ds)%%%%HiResBoundingBox: %.6f %.6f %.6f %.6fs
N(RRR	RRtpopen3RRdtsearchR`RRRwRgRjRRW(RRRRRtstdintstdouttstderrR!t
bbox_foundRRARRRRaRRRR"((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pytget_bboxs6
	

51.(c	C s+t|d|\}}|d}t|d}t|}|j}x|r`|jdrx|dIJ||IJn|jdr|j||dIJ|dIJ|d	IJ|d
IJ|dIJ|dIJ|d
IJ|dIJ|dIJ|r||IJnPnL|jdsQ|jdsQ|jdsQ|jdrDn
|j||j}qLW|j}x|r|jdr|dIJ|dIJ|d	IJ|dIJ|dIJtddkr|j}qn
|j||j}qpW|j|jtj|t	j
||dS(s<
    Convert the postscript to encapsulated postscript.
    Rs.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.usedistillerRN(R#RtreadlineRFRRRRRRR(	RRRR!R Rtepshttmphtline((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyRs\
	













	








RcB seZRS((RR(((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(^Rt
__future__RR	tmathRRRRRthashlibRtImportErrorttempfileRt	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#tnumpyRjRRdRt	NameErrortsetsR$RRFt	cmd_splittbackend_versionR+RBRLRURZRfRoRpRjRRRRhRgRRR#R*RRt
FigureManagerR(((sQ/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_ps.pyt<module>sH	
""
	






















						}	m%2	+A