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/mpl_toolkits/axisartist/axis_artist.pyc
�
���Lc@s dZddljZddljZddljZ	ddl
jZddlm
Z
ddlmZmZmZmZmZddlmZddlmZddlmZddlZddlZddljZddlm Z d	ej!fd
��YZ"de#fd��YZ$dd
lm%Z%de&fd��YZ'ddlm!Z!de!e'fd��YZ(d�Z)de	j*fd��YZ+d�Z,de+e'fd��YZ-de-e'fd��YZ.d�Z/defd��YZ0dej%fd��YZ1d �Z2d!�Z3e4d"kre2�ndS(#s�

axis_artist.py module provides axis-related artists. They are

 * axis line
 * tick lines
 * tick labels
 * axis label
 * grid lines

The main artist class is a AxisArtist and a GridlinesCollection. The
GridlinesCollection is responsible for drawing grid lines and the
AxisArtist is responsible for all other artists. The AxisArtist class
has attributest that are associated with each type of artists.

 * line : axis line
 * major_ticks : major tick lines
 * major_ticklabels : major tick labels
 * minor_ticks : minor tick lines
 * minor_ticklabels : minor tick labels
 * label : axis label

Typically, the AxisArtist associated with a axes will be accessed with
the *axis* dictionary of the axes, i.e., the AxisArtist for the bottom
axis is

  ax.axis["bottom"]

where *ax* is an instance of axes (mpl_toolkits.axislines.Axes).
Thus, ax.axis["bottom"].line is an artist associated with the axis line, and ax.axis["bottom"].major_ticks is an artist associated with the major tick lines.

You can change the colors, fonts, line widths, etc. of these artists
by calling sutable set method. For example, to change the color of the major ticks of the bottom axis to red,

  ax.axis["bottom"].major_ticks.set_color("r")

However, things like the locations of ticks, and their ticklabels need
to be changed from the side of the grid_helper.

axis_direction
--------------

AxisArtist, AxisLabel, TickLabels have *axis_drection* attribute,
which adjusts the location, angle, etc.,. The *axis_direction* must be
one of [left, right, bottom, top] and they follow the matplotlib
convention for the rectangle axis.

For example, for the *bottom* axis (the left and right is relative to
the direction of the increasing coordinate),

 * ticklabels and axislabel are on the right
 * ticklabels and axislabel have text angle of 0
 * ticklabels are baseline, center-aligned
 * axislabel is top, center-aligned


The text angles are actually relative to (90 + angle of the direction
to the ticklabel), which gives 0 for bottom axis.

                        left bottom right top
 ticklabels location    left right  right left
 axislabel location     left right  right left
 ticklabels angle       90    0      -90  180
 axislabel angle        180   0     0     180
 ticklabel va           center baseline center baseline
 axislabel va           center top      center btoom
 ticklabel ha           right  center   right  center
 axislabel ha           right  center   right  center


Ticks are by default direct opposite side of the ticklabels. To make
ticks to the same side of the ticklabels,

  ax.axis["bottom"].major_ticks.set_ticks_out(True)


Following attributes can be customized (use set_xxx method)

 * Ticks : ticksize, tick_out
 * TickLabels : pad
 * AxisLabel : pad

i����N(tPath(tAffine2DtScaledTranslationtIdentityTransformtTransformedPathtBbox(tLineCollection(trcParams(tallow_rasterization(t
AxislineStylet
BezierPathcBs,eZd�Zd�Zd�Zd�ZRS(cOs2tjj|gg||�||_t|_dS(N(tmlinestLine2Dt__init__t_pathtFalset_invalid(tselftpathtkltkw((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR
ss	cCs(t|j|j��|_t|_dS(N(RRt
get_transformt_transformed_pathRR(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytrecachexscCs||_t|_dS(N(RtTrueR(RR((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytset_path~s	c	CsU|jr|j�n|js#dS|jd�|j�}|j|�|j|j�|j|j	�|j
|j�|j|j
�|j�r�|j}|j}n|j}|j}|j|�|j|�|jj|jd�}|dkr:|jj�\}}t||�}|||||j��n|j�|jd�dS(Ntline2dt
_draw_nothing(RRt_visiblet
open_grouptnew_gct_set_gc_cliptset_foregroundt_colortset_antialiasedt_antialiasedt
set_linewidtht
_linewidtht	set_alphat_alphat	is_dashedt
_dashcapstylet_dashjoinstylet_solidcapstylet_solidjoinstylet
set_joinstyletset_capstylet_lineStylestgett
_linestyleRtget_transformed_path_and_affinetgetattrtfrozentrestoretclose_group(	RtrenderertgctcaptjointfuncnamettpathtaffinetlineFunc((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytdraw�s2	
	

			


(t__name__t
__module__R
RRR?(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR
qs			tUnimplementedExceptioncBseZRS((R@RA(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRB�s(tArtisttAttributeCopiercBs/eZed�Zd�Zd�Zd�ZRS(cCs)||_||_tt|�j�dS(N(t_klasst_ref_artisttsuperRDR
(Rt
ref_artisttklass((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR
�s		cCs
||_dS(N(RF(Rtartist((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytset_ref_artist�scCstd��dS(Nsget_ref_artist must overriden(tRuntimeError(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytget_ref_artist�scCsad|}t|j|�|�}|dkr]|j�}|rVt||��}|S|Sn|S(Ntget_tauto(R3RERM(Rt	attr_namet
default_valuetget_attr_method_nametcRHtattr((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytget_attribute_from_ref_artist�s
(R@RARCR
RKRMRU(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRD�s		(RtTickscBs�eZdZed�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zeddgd
dgg�Zd�ZRS(sO
    Ticks are derived from Line2D, and note that ticks themselves
    are markers. Thus, you should use set_mec, set_mew, etc.

    To change the tick size (length), you need to use
    set_ticksize. To change the direction of the ticks (ticks are
    in opposite direction of ticklabels by default), use
    set_tick_out(False).
    cKs�||_g|_|j|�|jdd�|_|jdk	r�d|kr\d|d<nd|kr�d|kr�d|d<q�ntj|dgdg|�tj||jdt�|j	t
�dS(NtaxistcolorROtmewtmarkeredgewidthgRI(t	_ticksizetlocs_angles_labelstset_tick_outtpoptNonet_axisRR
RDtset_snapR(Rtticksizettick_outtkwargs((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR
�s		

cCs|jjdjS(Ni(RFt
majorTickst	tick1line(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRM�scCs|jdd�S(NRXtk(RU(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt	get_color�scCs$|jdkr|j�S|jSdS(NRO(t_markeredgecolorRh(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytget_markeredgecolor�s
cCs|jdd�S(NRZg�?(RU(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytget_markeredgewidth�scCs
||_dS(sD
        set True if tick need to be rotated by 180 degree.
        N(t	_tick_out(Rtb((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR]�scCs|jS(sH
        Return True if the tick will be rotated by 180 degree.
        (Rl(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytget_tick_out�scCs
||_dS(s3
        set lenth of the ticks in points.
        N(R[(RRb((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytset_ticksizescCs|jS(s7
        Return length of the ticks in points.
        (R[(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytget_ticksize	scCs
||_dS(N(tlocs_angles(RRq((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytset_locs_anglesscCsdS(N((RR7((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_updatesgg�?c
Cs\|j�sdS|j|�|j}|j�}|j�}|j|�|j|j��|j|j	��|j
|j�|j|�}t
�j||�}|j�r�d}nd}t
�}||}	xx|jD]m\}
}|j||�|jtj|
|
g��}|j||j|	t|�|j��|j�q�W|j�dS(Ni�i(tget_visibleRsR[RRRR RjR$RkR&R'tpoints_to_pixelsRtscaleRnRqt
rotate_degttransform_non_affinetnptarraytdraw_markerst_tickvert_pathRt
get_affinetclearR5(
RR7tsizet
path_transR8toffsettmarker_scalet	add_angletmarker_rotationtmarker_transformtloctangletlocs((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR?s0
	
		
(R@RAt__doc__RR
RMRhRjRkR]RnRoRpRrRsRR|R?(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRV�s											cCs�ddlj}|jd�}|j�|jd�}|jjt�|jjt�t	ddd|j�}|j
|�d
dg}|j|�|j�dS(Ni����iioRbi
RWg�������?giZg�������?ix(g�������?g((g�������?giZ(g�������?g((g�������?gix(
tmatplotlib.pyplottpyplottfiguretclftadd_subplottxaxistset_visibleRtyaxisRVt
add_artistRrR?(tplttfigtaxtticksRq((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt
test_ticksOs

	
t	LabelBasecBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	idd	6d	d6d
d6dd
6j
Zd�Zd
�Z
d�ZRS(s�
    A base class for AxisLabel and TickLabels. The position and angle
    of the text are calculated by to offset_ref_angle,
    text_ref_angle, and offset_radius attributes.
    cOsNg|_d|_d|_tt|�j||�|jd�t|_dS(Nigtanchor(	R\t
_ref_anglet_offset_radiusRGR�R
tset_rotation_modeRt_text_follow_ref_angle(RRRd((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR
gs			
cCs
||_dS(N(R�(Rta((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_set_ref_anglesscCs|jS(N(R�(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_get_ref_anglevscCs|jr|j�dSdSdS(NiZi(R�R�(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_get_text_ref_angleys	cCs
|j�S(N(R�(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_get_offset_ref_anglescCs
||_dS(N(R�(Rt
offset_radius((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_set_offset_radius�scCs|jS(N(R�(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_get_offset_radius�strighttlefttbottomttopcCsdS(N((RR7((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRs�scCs
|j�sdS|j|�|j�}|j�}t�}|j||�|j�}|j�}|dtj	}|j
�}|tj|�|tj|�}	}
|j
|	|
�|j||�tt|�j|�|j�|j|�|j|�dS(Ng�f@(RtRsRtget_rotationRt
set_transformR�R�RytpiR�tcostsint	translatetset_rotationRGR�R?R~(RR7ttrt
angle_origt	offset_trttext_ref_angletoffset_ref_angletthetatddtdxtdy((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR?�s$
	'

cCs�|j|�|j�}|j�}t�}|j||�|j�}|j�}|dtj}|j	�}|tj
|�|tj|�}	}
|j|	|
�|j
||�tt|�j|�}|j�|j|�|j
|�|S(Ng�f@(RsRR�RR�R�R�RyR�R�R�R�R�R�RGR�tget_window_extentR~(RR7R�R�R�R�R�R�R�R�R�tbbox((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR��s"
	'


(R@RAR�R
R�R�R�R�R�R�t__getitem__t_get_opposite_directionRsR?R�(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR�`s							

		cCs�ddlj}|jd�}|j�|jd�}|jdgdgd�tddd�}d}|j|�|jdd	�|j	d�|j
d
ddd
�|j|�|j�dS(Ni����iiog�?totTesti����R�i2thatcentertvaR�(
R�R�R�R�R�tplotR�R�R�R�tsetR�R?(R�R�R�tlabelR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyttest_labelbase�s



t	AxisLabelc
Bs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	e
ddddd	ddd�Zd
�Ze
ddddd	ddd�Z
d�Zd�Zd�Zd�ZRS(s

    Axis Label. Derived from Text. The position of the text is updated
    in the fly, so chaning text position has no effect. Otherwise, the
    properties can be changed as a normal Text.

    To change the pad between ticklabels and axis label, use set_pad.
    cOsv|jdd�}|jdd�|_tj|||�tj||jdt�|j|�d|_d|_dS(Ntaxis_directionR�RWRIii(	R^R_R`R�R
RDtset_axis_directiont_padt
_extra_pad(RRRdR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR
�s
	cCs
||_dS(s�
        Set the pad in points. Note that the actual pad will be the
        sum of the internal pad and the external pad (that are set
        automatically by the AxisArtist), and it only set the internal
        pad
        N(R�(Rtpad((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytset_pad�scCs|jS(sE
        return pad in points. See set_pad for more details.
        (R�(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytget_padscCs
||_dS(sq
        Set external pad IN PIXELS. This is intended to be set by the
        AxisArtist, bot by user..
        N(R�(Rtp((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_set_external_padscCs|jS(s#
        Get external pad.
        (R�(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_get_external_padscCs
|jj�S(N(R`t	get_label(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRMscCs;tt|�j�}|dkr4|jj�j�S|jS(Nt
__from_axes__(RGR�tget_textR`R�t_text(Rtt((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR�!sR�R�R�R�R�cCsL|dkrtd��n|j|\}}|j|�|j|�dS(NR�R�R�R�s8direction must be on of "left", "right", "top", "bottom"(sleftsrightstopsbottom(t
ValueErrort_default_alignmentstset_vatset_ha(RtdR�R�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytset_default_alignment.s

i�icCs3|dkrtd��n|j|j|�dS(NR�R�R�R�s8direction must be on of "left", "right", "top", "bottom"(sleftsrightstopsbottom(R�R�t_default_angles(RR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytset_default_angle=scCs9|dkrtd��n|j|�|j|�dS(s
        Adjust the text angle and text alignment of axis label
        according to the matplotlib convention.


        =====================    ========== ========= ========== ==========
        property                 left       bottom    right      top
        =====================    ========== ========= ========== ==========
        axislabel angle          180        0         0          180
        axislabel va             center     top       center     btoom
        axislabel ha             right      center    right      center
        =====================    ========== ========= ========== ==========

        Note that the text angles are actually relative to (90 + angle
        of the direction to the ticklabel), which gives 0 for bottom
        axis.

        R�R�R�R�s8direction must be on of "left", "right", "top", "bottom"N(sleftsrightstopsbottom(R�R�R�(RR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR�Ds
cCs|jdd�S(NRXRg(RU(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRh]scCs\|j�sdS|j|j��}|j�|}|j|�tt|�j|�dS(N(RtRuR�R�R�RGR�R?(RR7R�tr((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR?`s
(sbottomscenter(stopscenter(stopscenter(sbottomscenter(R@RAR�R
R�R�R�R�RMR�tdictR�R�R�R�R�RhR?(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR��s*															t
TickLabelsc
Bs�eZdZd�Zd�Zd�Zd�Zd�Zeddddd	ddd�Z	edddd
d	ddd�Z
d�Zd�Zd�Z
d�ZRS(s�
    Tick Labels. While derived from Text, this single artist draws all
    ticklabels. As in AxisLabel, the position of the text is updated
    in the fly, so changing text position has no effect. Otherwise,
    the properties can be changed as a normal Text. Unlike the
    ticklabels of the mainline matplotlib, properties of single
    ticklabel alone cannot modified.

    To change the pad between ticks and ticklabels, use set_pad.
    cKs<|jdd�}tj||�|j|�d|_dS(NR�R�i(R^R�R
R�t_axislabel_pad(RRdR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR
ws
cCs|jj�dS(Ni(R`tget_ticklabels(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRM�scCsB|dkrtd��n||_|j|�|j|�dS(sh
        Adjust the text angle and text alignment of ticklabels
        according to the matplotlib convention.

        The *label_direction* must be one of [left, right, bottom,
        top].

        =====================    ========== ========= ========== ==========
        property                 left       bottom    right      top
        =====================    ========== ========= ========== ==========
        ticklabels angle         90         0         -90        180
        ticklabel va             center     baseline  center     baseline
        ticklabel ha             right      center    right      center
        =====================    ========== ========= ========== ==========


        Note that the text angles are actually relative to (90 + angle
        of the direction to the ticklabel), which gives 0 for bottom
        axis.

        R�R�R�R�s9direction must be one of "left", "right", "top", "bottom"N(sleftsrightstopsbottom(R�t_axis_directionR�R�(Rtlabel_direction((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR��s
	
cCs#|j|j�}|j|�dS(N(R�R�R�(RR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytinvert_axis_direction�sc
Cs�|j|�}|sd	Sd}|j�|j�}}|dkr�tg|D]\}}}	|^qN�}
|dkr�|
}q�|dkr�d|
}q�n|dkrtg|D]\}}}	|^q��}
|dkr�|
}q�|dkr�d|
}q�n�|dkr�tg|D]\}}}	|^q�}
|dkrK|
}q�|dkrdd|
}q�|dkr�tg|D]\}}}	||	^qz�}tg|D]\}}}	|	^q��}|}||}
q�n�|dkr�tg|D]\}}}	|^q��}
|dkr#|
}q�|dkr<d|
}q�|dkr�tg|D]\}}}	||	^qR�}tg|D]\}}}	|	^q~�}|}||}
q�n||
fS(
sU
        Calculates the offsets of the ticklabels from the tick and
        their total heights. The offset only takes account the offset
        due to the vertical alignment of the ticklabels, i.e.,if axis
        direction is bottom and va is ;top', it will return 0. if va
        is 'baseline', it will return (height-descent).
        iR�R�g�?R�R�tbaselineR�(ii(t!get_texts_widths_heights_descentstget_vatget_hatmax(
RR7R�twhd_listR�R�R�twthR�R�t
max_ascenttmax_descent((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_get_ticklabels_offsets�sP(	(	(	
,((	
,(R�R�R�R�R�R�iZi����ii�c	Cs�|j�s|j�|_dS|j||j�\}}|j�|j|j��}|j||�xv|jD]k\\}}}}|j	�s�qtn|j
|�|j|�|j|�|j
|�tj||�qtW|||_dS(N(RtR�R�R�R�RuR�R�t_locs_angles_labelststripR�tset_xtset_ytset_textR�R?(	RR7R�ttotal_widthR�txtyR�tl((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR?�s$		



cCs
||_dS(N(R�(RR\((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytset_locs_angles_labelsscCs�g}|j||j�\}}|j�|j|j��}|j||�xs|jD]h\\}}}}	|j|�|j|�|j	|�|j
|	�tj||�}
|j
|
�q[W|S(N(R�R�R�RuR�R�R�R�R�R�R�R�R�tappend(RR7tbboxesR�R�R�R�R�R�R�tbb((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytget_window_extentss		



c
Cs|g}xo|jD]d\\}}}}|j�s7qn|j|�\}}|j||jd|�}	|j|	�qW|S(sH
        return a list of width, height, descent for ticklaels.
        tismath(R�R�tis_math_texttget_text_width_height_descentt_fontpropertiesR�(
RR7R�R�R�R�R�t
clean_lineRtwhd((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR�)s(scentersright(scenterR�(sbaselinescenter(sbaselinescenter(R@RAR�R
RMR�R�R�R�R�R�R?R�R�R�(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR�ks$
					=					cCs�ddlj}|jd�}|j�|jd�}|jjt�|jjt�|j	ddgddgd�t
dd	d
|j�}|j|�ddg}g|D]\}}}||df^q�}|j|�|j	dgdgd�t
ddd�}	|	jd�|	jd�|	jd�|j|	�tdd�}
||
_|
jd	�|j|
�|jdd�|jdd�|j�dS(Ni����iiog�������?g�������?g�?R�Rbi
RWi����s0.2i����s0.4i�t,R�iiR�R�R�(g�������?g�?((g�������?g�?i����s0.2(g�������?g�?((g�������?g�?i����s0.4(R�R�R�R�R�R�R�RR�R�RVR�RrR�R�R�R�R�R�R�tset_xlimtset_ylimR?(R�R�R�R�R\txyR�R�ttick_locs_anglest	axislabelt
ticklabels((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyttest_ticklabels9s4

	,




	

tGridlinesCollectioncBs#eZd�Zd�Zd�ZRS(cOs*tt|�j||�|jd�dS(N(RGRR
tset_grid_helperR_(RRRd((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR
bscCs
||_dS(N(t_grid_helper(Rtgrid_helper((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRfscCs�|jdk	rs|jj|j�|jj�}|rc|jg|D]}tj|�^qD�qs|jg�ntt	|�j
|�dS(N(RR_t
update_limtaxest
get_gridlinestset_segmentsRyt	transposeRGRR?(RR7tglR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR?is,(R@RAR
RR?(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRas		t
AxisArtistcBs7eZdZdZd�Zd�Zeee�Zd dd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd d�Zd
�Zd�Zd�Zd�Zd�Zd�Zedd!dd"dd#dd$�Zd�Zd�Zd�Zd�Zd�Zd�Zed��Z d d d d d�Z!RS(%s�
    An artist which draws axis (a line along which the n-th axes coord
    is constant) line, ticks, ticklabels, and axis label.
    g@cCs|jj|�S(N(R�R�(Rtv((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt
_set_labelpadscCs
|jj�S(N(R�R�(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt
_get_labelpad�sR�cKsQtt|�j|�||_||_|d	kr=d
}nt�|_t|d|d|j�|_	t
|_t
|_t
|_
t
|_t
|_|dkr�d}|j|_nd}|j|_d	|_||_|j�|j||�|j|�|j�|j|j�t|_d|_d|_d|_|j |�d	S(sP
        *axes* : axes
        *helper* : an AxisArtistHelper instance.
        iiR�R�tyticktxtickg�f@gN(ii(sleftsright(!RGRR
Rt_axis_artist_helperR_Rt
dpi_transformRtoffset_transformRt_label_visiblet_majortick_visiblet_majorticklabel_visiblet_minortick_visiblet_minorticklabel_visibleR�RWR�t_axisline_styleR�t
_init_linet_init_tickst_init_offsetTextt_init_labelt
set_zordertZORDERRt_rotate_label_along_linet_tick_add_anglet_ticklabel_add_anglet_axislabel_add_angleR�(RRthelperR�R�Rt	axis_name((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR
�s<										


				cCs�|d	krtd��n||_|d
krM|jd�|jd�n|jd�|jd�|jj|�|jj|�dS(sU
        Adjust the direction, text angle, text alignment of
        ticklabels, labels following the matplotlib convention for
        the rectangle axes.

        The *axis_direction* must be one of [left, right, bottom,
        top].

        =====================    ========== ========= ========== ==========
        property                 left       bottom    right      top
        =====================    ========== ========= ========== ==========
        ticklabels location      "-"        "+"       "+"        "-"
        axislabel location       "-"        "+"       "+"        "-"
        ticklabels angle         90         0         -90        180
        ticklabel va             center     baseline  center     baseline
        ticklabel ha             right      center    right      center
        axislabel angle          180        0         0          180
        axislabel va             center     top       center     btoom
        axislabel ha             right      center    right      center
        =====================    ========== ========= ========== ==========


        Note that the direction "+" and "-" are relative to the direction of
        the increasing coordinate. Also, the text angles are actually
        relative to (90 + angle of the direction to the ticklabel),
        which gives 0 for bottom axis.

        R�R�R�R�s8direction must be on of "left", "right", "top", "bottom"t-t+N(sleftsrightstopsbottom(sleftstop(R�R�tset_ticklabel_directiontset_axislabel_directiontmajor_ticklabelsR�R�(RR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR��s	


cCs@|dkrtd��n|dkr3d|_n	d|_dS(s�
        Adjust the direction of the ticklabel.

         ACCEPTS: [ "+" | "-" ]

        Note that the label_direction '+' and '-' are relative to the
        direction of the increasing coordinate.
        R4R3s!direction must be one of "+", "-"i�iN(R4R3(R�R/(Rttick_direction((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR5�s

cCs2|jdd|_|jj�|jj�dS(Ni�ih(R/R7R�tminor_ticklabels(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytinvert_ticklabel_directions
cCs@|dkrtd��n|dkr3d|_n	d|_dS(s�
        Adjust the direction of the axislabel.

         ACCEPTS: [ "+" | "-" ]

        Note that the label_direction '+' and '-' are relative to the
        direction of the increasing coordinate.
        R4R3s!direction must be one of "+", "-"i�iN(R4R3(R�R0(RR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR6s
	cCs|jj|jS(N(Rt	transAxesR (R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR*scCs|jS(s5
        Return axis artist helper instance.
        (R(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt
get_helper-scKsT|dkrtj�St|tj�r4||_nt||�|_|j�dS(s�
        Set the axisline style.

        *axisline_style* can be a string with axisline style name with optional
         comma-separated attributes. Alternatively, the attrs can
         be provided as keywords.

         set_arrowstyle("->,size=1.5")
         set_arrowstyle("->", size=1.5)

        Old attrs simply are forgotten.

        Without argument (or with arrowstyle=None), return
        available styles as a list of strings.
        N(R_R	t
pprint_stylest
isinstancet_BaseR&R'(Rtaxisline_styleR((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytset_axisline_style4s
cCs|jS(s4
        return the current axisline style.
        (R&(R((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pytget_axisline_styleQscCs�|jj|j�|j}|j�}|dkrot|jj|j�dtddtdd|�|_	n||d|�|_	dS(sY
        Initialize the *line* artist that is responsible to draw the axis line.
        RXsaxes.edgecolort	linewidthsaxes.linewidtht	transformN(
Rtget_line_transformRR RBR_R
tget_lineRtline(RttranR@((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR'Ws


cCsa|jj|jj|j��|j�dk	rM|jj|jj	��n|jj
|�dS(N(RGRRRFRRBR_tset_line_mutation_scaleR7tget_sizeR?(RR7((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt
_draw_linegsc
Ks�|jj|j�|j}|jdtd|�}|jdtd|�}|jdtd|�}|jdtd|�}t|d	|jd
|�|_t|d	|jd
|�|_	|dkr�td}n
td
}t
jd|�}	td|d	|jd|j
�|_td|d	|jd|j
�|_|jjd|jjd
|d|	�|jj|�|jjd|jjd
|d|	�|jj|�dS(Ntmajor_tick_sizes
%s.major.sizetmajor_tick_pads%s.major.padtminor_tick_sizes
%s.minor.sizetminor_tick_pads%s.minor.padRWRDR�sxtick.labelsizesytick.labelsizeRR�R�tfontproperties(Rtget_tick_transformRR R0RRVRWtmajor_tickstminor_tickstfont_managertFontPropertiesR�R�R7R9R�R�R�(
RR2RttransRLRMRNRORt	fontprops((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR(ns@
								

cCs�g}g}|j}|j}x�|D]�\}}}}	|d}
|
|7}
tj|
|dtj�dkrx|}n
|d}|j||g�|j||
|	g�q%W||fS(s�
        return ticks_loc_angle, ticklabels_loc_angle_label

        ticks_loc_angle : list of locs and angles for ticks
        ticklabels_loc_angle_label : list of locs, angles and labels for tickslabels
        iZg�f@gi�(R.R/RyR�R�R�(Rt	tick_itertticks_loc_angletticklabels_loc_angle_labelttick_add_angletticklabel_add_angleR�tangle_normalt
angle_tangentR�tangle_labelt
angle_tick((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_get_tick_info�s		

$	
cCs�|jd�}|jj�rd|jj�rd|jj|jj|�|jj|jj|�n |jjd�|jjd�|jj	|j
�\}}|j|�\}}|jj|�|jj
|�|jj|�|jj|�|j|�\}}|jj|�|jj
|�|jj|�|jj|�|jj�sg|jj�rw|j|�n|jj|�S(Ng�?i(RuRRRtRnR7R�R[R9Rtget_tick_iteratorsRRaRrR�R?RSt_draw_offsetTextR�(RR7tdpi_cortmajortick_itertminortick_iterttick_loc_angletticklabel_loc_angle_label((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_draw_ticks�s(R�iiR�R�cCs�|j|\}}}}tjdd||fdddd
ddd	td
d|d|�|_|jjt��|jj|j�dS(NtR	txycoordss
axes fractiontxytextit
textcoordss
offset pointsRXsxtick.colortverticalalignmentthorizontalalignment(ii(	t_offsetText_postmtextt
AnnotationRt
offsetTextR�RRt_set_artist_props(Rt	directionR�R�R�R�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR)�s
cCsn|jj|jjjj��|jj|jj��|jj	�|jj�d}d|f|j_
dS(Ng@i(RsR�RWtmajort	formattert
get_offsettset_sizeR7RJR�Rl(RR�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_update_offsetText�s cCs|j�|jj|�dS(N(RzRsR?(RR7((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRcs
cKs�|jdtd�}tjd|�}td|�}|jj|j�|j}t	dddddd|d	|j
d
|d|j�|_|jj
|jj�|jdd
�}|jj|�dS(Nt	labelsizesaxes.labelsizeRRPiR�RXRORWRDR�tlabelpadi(R0RRTRUR�Rtget_axislabel_transformRR R�RWR�R�t
set_figureR�R�(RRR{RWt	textpropsR�R|((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR*s	

	c	CsD|jj�sdStjdtd�}|j|jkr�|jj�rZ|jj�sy|j	j�r�|jj�r�|jj
}q�d}nt|jj
|jj
g�}|jj|�|jj|j�\}}|dkr�dS|d}|\}}|jj||j�|jjd|d|�|jj|�dS(NRsaxes.labelsizeiiZR�R�(R�RtRTRURR/R0RRRnRSR[R�R7R�R9R�Rtget_axislabel_pos_angleRR_R�R�R?(	RR7RWt
axislabel_padR	R^R_R�R�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt_draw_label's&	
cCs|jj|�dS(N(R�R�(Rts((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt	set_labelPscCs�|j�sdS|jt�|jj|j�|jd�}|jj�j	||�|j
|�|j|�|j|�|j
t�dS(s*Draw the axis lines, tick lines and labelsNg�?(RtRR@RRRRuRR~RvRKRiR�R6(RR7Rd((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyR?Ts



cCs|rttt}}}n2|dk	r@ttt}}}nd\}}}|dk	rd|}n|dk	ry|}n|dk	r�|}n|dk	r�|jj|�|jj|�n|dk	r�|jj|�|jj|�n|dk	r|jj|�ndS(s@
        Toggle visibility of ticks, ticklabels, and (axis) label.
        To turn all off, ::

          axis.toggle(all=False)

        To turn all off but ticks on ::

          axis.toggle(all=False, ticks=True)

        To turn all on but (axis) label off ::

          axis.toggle(all=True, label=False))

        N(NNN(	RR_RRRR�RSR7R9R�(RtallR�RR�t_tickst_ticklabelst_label((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyttogglens&			N(iisbottomsright(iisbottomR�(iistopsright(iisbottomsright("R@RAR�R,RRtpropertytLABELPADR_R
R�R5R:R6RR<RARBR'RKR(RaRiR�RpR)RzRcR*R�R�RR?R�(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyRvs@		<	6										0		/						)	cCsWddlm}tjd�}|j�|jd�}|jjt�|j	jt�|j
|dd�}t||dddd�a
|jt
�|j
|dd	�}t||dddd	�a
|jt
�|j
|dd
�}t||dddd
�a
t
jd�|jt
�t
jjt�|jd�t
jjd
�tj�dS(Ni����(tAxisArtistHelperRectlineariioR�R�R�R�R�R�tTTTR�i(tmpl_toolkits.axisartistR�R�R�R�R�R�R�RR�tFixedRR_taxislineR�R�RRR]t
set_ylabelR�R�R?(R�R�R�t_helper((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyttest_axis_artist�s(





cCs�ddlm}tjd�}|j�|jd�}|jjt�|j	jt�|j
|dd�}t||dddd�a
t
jd	�|jt
�t
jjt�|jd
�tj�dS(Ni����(R�iioR�R�R�R�R�R�(tmpl_toolkits.axislinesR�R�R�R�R�R�R�RR�R�RR_R�R�R�RRR]R�R?(R�R�R�R�((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyttest_axis_artist2�s



t__main__(5R�tmatplotlib.axesRtmaxestmatplotlib.artistRJtmartisttmatplotlib.textttextRqtmatplotlib.font_managerRTtmatplotlib.pathRtmatplotlib.transformsRRRRRtmatplotlib.collectionsRt
matplotlibRRtwarningstnumpyRytmatplotlib.linestlinesRR@R	RR
t	ExceptionRBRCtobjectRDRVR�tTextR�R�R�R�R
RRR�R�R@(((sV/opt/alt/python27/lib64/python2.7/site-packages/mpl_toolkits/axisartist/axis_artist.pyt<module>RsB(4�	p	��	(��%	$