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

)Uc@sddlZddlZddlmZejZddlmZddlmZm	Z	m
Z
mZddlmZm
Z
mZmZmZddlmZmZddlmZdefd	YZd
efdYZdZd
ZdefdYZdefdYZied6ed6ed6ZdZdZeej idj!ed6e_ dZ"dZ#ej$j%ddj!geD]Z&e'e&^qde#j(dS(iN(tma(tdedent(t
NullFormattertScalarFormattertLogFormatterMathtextt	Formatter(tNullLocatort
LogLocatortAutoLocatortSymmetricalLogLocatortFixedLocator(t	TransformtIdentityTransform(t	docstringt	ScaleBasecBs)eZdZdZdZdZRS(s@
    The base class for all scales.

    Scales are separable transformations, working on a single dimension.

    Any subclasses will want to override:

      - :attr:`name`
      - :meth:`get_transform`

    And optionally:
      - :meth:`set_default_locators_and_formatters`
      - :meth:`limit_range_for_scale`
    cCs
tdS(sq
        Return the :class:`~matplotlib.transforms.Transform` object
        associated with this scale.
        N(tNotImplementedError(tself((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyt
get_transformscCs
tdS(s
        Set the :class:`~matplotlib.ticker.Locator` and
        :class:`~matplotlib.ticker.Formatter` objects on the given
        axis to match this scale.
        N(R(Rtaxis((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyt#set_default_locators_and_formatters"scCs
||fS(s
        Returns the range *vmin*, *vmax*, possibly limited to the
        domain supported by this scale.

        *minpos* should be the minimum positive value in the data.
         This is used by log scales to determine a minimum value.
        ((Rtvmintvmaxtminpos((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pytlimit_range_for_scale*s(t__name__t
__module__t__doc__RRR(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRs		tLinearScalecBs/eZdZdZdZdZdZRS(s#
    The default linear scale.
    tlinearcKsdS(N((RRtkwargs((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyt__init__;scCsD|jt|jt|jt|jtdS(sd
        Set the locators and formatters to reasonable defaults for
        linear scaling.
        N(tset_major_locatorRtset_major_formatterRtset_minor_locatorRtset_minor_formatterR(RR((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR>scCstS(sy
        The transform for linear scaling is just the
        :class:`~matplotlib.transforms.IdentityTransform`.
        (R(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRHs(RRRtnameRRR(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR4s
		
cCs/|dk}|jr+tj|d|S|S(s
    Return a Numpy masked array where all non-positive values are
    masked.  If there are no non-positive values, the original array
    is returned.
    gtmask(tanyRtMaskedArray(taR$((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyt_mask_non_positivesPscCsd||dk<|S(NgYng((R'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyt_clip_non_positives[stLogScalecBseZdZdZdefdYZdefdYZdefdYZdefd	YZd
efdYZ	defd
YZ
defdYZdefdYZdefdYZ
dZdZdZdZRS(s
    A standard logarithmic scale.  Care is taken so non-positive
    values are not plotted.

    For computational efficiency (to push as much as possible to Numpy
    C code in the common cases), this scale provides different
    transforms depending on the base of the logarithm:

       - base 10 (:class:`Log10Transform`)
       - base 2 (:class:`Log2Transform`)
       - base e (:class:`NaturalLogTransform`)
       - arbitrary base (:class:`LogTransform`)
    tlogtLogTransformBasecBs#eZdZdZeZdZRS(icCs2tj||dkr%t|_n	t|_dS(NR$(RRR(t_handle_nonposR)(Rtnonpos((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRus
(RRt
input_dimstoutput_dimstTruetis_separableR(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR,pstLog10TransformcBs eZdZdZdZRS(g$@cCs<|j|d}t|tr/tj|Stj|S(Ng$@(R-t
isinstanceR&Rtlog10tnp(RR'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyt	transforms
cCs
tjS(N(R*tInvertedLog10Transform(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pytinverteds(RRtbaseR7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR3}s	R8cBs2eZdZdZeZdZdZdZRS(ig$@cCstjd|dS(Ng$@(Rtpower(RR'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR7scCs
tjS(N(R*R3(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR9s(	RRR/R0R1R2R:R7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR8s	t
Log2TransformcBs eZdZdZdZRS(g@cCsI|j|d}t|tr<tj|tjdStj|S(Ng@i(R-R4R&RR+R6tlog2(RR'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR7scCs
tjS(N(R*tInvertedLog2Transform(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR9s(RRR:R7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR<s	R>cBs2eZdZdZeZdZdZdZRS(ig@cCstjd|dS(Ng@(RR;(RR'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR7scCs
tjS(N(R*R<(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR9s(	RRR/R0R1R2R:R7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR>s	tNaturalLogTransformcBs#eZejZdZdZRS(cCs?|j|tj}t|tr2tj|Stj|S(N(R-R6teR4R&RR+(RR'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR7s
cCs
tjS(N(R*tInvertedNaturalLogTransform(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR9s(RRR6R@R:R7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR?s		RAcBs5eZdZdZeZejZdZ	dZ
RS(icCstjtj|tjS(N(RR;R6R@(RR'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR7scCs
tjS(N(R*R?(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR9s(RRR/R0R1R2R6R@R:R7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRAs		tLogTransformcBs5eZdZdZeZdZdZdZRS(icCs;tj|||_|dkr.t|_n	t|_dS(NR$(RRR:R(R-R)(RR:R.((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRs

	cCs_|j||j}t|trBtj|tj|jStj|tj|jS(N(R-R:R4R&RR+R6(RR'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR7scCstj|jS(N(R*tInvertedLogTransformR:(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR9s(	RRR/R0R1R2RR7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRBs		RCcBs5eZdZdZeZdZdZdZRS(icCstj|||_dS(N(RRR:(RR:((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRs
cCstj|j||jS(N(RR;R:(RR'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR7scCstj|jS(N(R*RBR:(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR9s(	RRR/R0R1R2RR7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRCs		cKs*|jdkrH|jdd}|jdd
}|jdd}n6|jdd}|jdd
}|jd	d}|dkrtdn|dkr|j||_nZ|dkr|j||_n9|tjkr|j	||_n|j
|||_||_||_d
S(s)
        *basex*/*basey*:
           The base of the logarithm

        *nonposx*/*nonposy*: ['mask' | 'clip' ]
          non-positive values in *x* or *y* can be masked as
          invalid, or clipped to a very small positive number

        *subsx*/*subsy*:
           Where to place the subticks between each major tick.
           Should be a sequence of integers.  For example, in a log10
           scale: ``[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]``

           will place 10 logarithmically spaced minor ticks between
           each major tick.
        txtbasexg$@tsubsxtnonposxR$tbaseytsubsytnonposytclips/nonposx, nonposy kwarg must be 'mask' or 'clip'g@N(smaskRK(
t	axis_nametpoptNonet
ValueErrorR3t
_transformR<R6R@R?RBR:tsubs(RRRR:RQR.((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRs$	cCs\|jt|j|jt|j|jt|j|j|jtdS(sb
        Set the locators and formatters to specialized versions for
        log scaling.
        N(	RRR:R RR!RQR"R(RR((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRscCs|jS(s
        Return a :class:`~matplotlib.transforms.Transform` instance
        appropriate for the given logarithm base.
        (RP(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRscCs.|dkr|p||dkr'|p*|fS(s6
        Limit the domain to positive values.
        g((RRRR((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR%s(RRRR#RR,R3R8R<R>R?RARBRCRRRR(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR*_s

	)	
	tSymmetricalLogScalecBs[eZdZdZdefdYZdefdYZdZdZdZ	RS(	sh
    The symmetrical logarithmic scale is logarithmic in both the
    positive and negative directions from the origin.

    Since the values close to zero tend toward infinity, there is a
    need to have a range around zero that is linear.  The parameter
    *linthresh* allows the user to specify the size of this range
    (-*linthresh*, *linthresh*).
    tsymlogtSymmetricalLogTransformcBs5eZdZdZeZdZdZdZRS(icCsRtj|||_||_tj||_tj||j||_dS(N(RRR:t	linthreshR6R+t	_log_baset
_linadjust(RR:RU((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR>s

		cCstj|}tj|}tj||j|jdt}|tjtj||j	}|j
jrtjtj|j
||j
|Stj|SdS(Ntcopy(R6tasarraytsignRt
masked_insideRUtFalseR+tabsRVR$R%twhereRW(RR'RZtmaskedR+((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR7Es"#

cCstj|j|jS(N(RRtInvertedSymmetricalLogTransformR:RU(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR9Qs(	RRR/R0R1R2RR7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRT9s		R`cBs5eZdZdZeZdZdZdZRS(icCsktj|||_||_tj||_tj||j|_|tj||j|_dS(N(	RRR:RUR6R+RVt_log_linthreshRW(RR:RU((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRYs
		cCsktj|}tj||jktj||jk||jtj|j|tj|j|S(N(R6RYR^RaRWR;R:(RR'((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR7as
cCstj|jS(N(RRRTR:(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR9is(	RRR/R0R1R2RR7R9(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyR`Ts		cKs|jdkrH|jdd}|jdd}|jdd
}n6|jdd}|jdd}|jd	d
}|j|||_||_||_||_d
S(s"
        *basex*/*basey*:
           The base of the logarithm

        *linthreshx*/*linthreshy*:
          The range (-*x*, *x*) within which the plot is linear (to
          avoid having the plot go to infinity around zero).

        *subsx*/*subsy*:
           Where to place the subticks between each major tick.
           Should be a sequence of integers.  For example, in a log10
           scale: ``[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]``

           will place 10 logarithmically spaced minor ticks between
           each major tick.
        RDREg$@t
linthreshxg@RFRHt
linthreshyRIN(RLRMRNRTRPR:RURQ(RRRR:RURQ((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRls		cCsb|jt|j|jt|j|jt|j|j|jt	dS(sn
        Set the locators and formatters to specialized versions for
        symmetrical log scaling.
        N(
RR	RR RR:R!RQR"R(RR((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRscCs|jS(sE
        Return a :class:`SymmetricalLogTransform` instance.
        (RP(R((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRs(
RRRR#RRTR`RRR(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyRR-s		 	
RR+RScCstj}|j|S(N(t_scale_mappingtkeystsort(tnames((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pytget_scale_namess
cKsQ|j}|dkr!d}n|tkr@td|nt|||S(sC
    Return a scale class by name.

    ACCEPTS: [ %(names)s ]
    RsUnknown scale type '%s'N(tlowerRNRdRO(tscaleRR((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyt
scale_factorys	s | RgcCs|t|j<dS(sd
    Register a new kind of scale.

    *scale_class* must be a subclass of :class:`ScaleBase`.
    N(RdR#(tscale_class((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pytregister_scalescCsg}xtD]}t|}|jd||jdt|jj}djg|jdD]}d|^qf}|j||jdqWdj|S(sF
    Helper function for generating docstrings related to scales.
    s    '%s'ts
s        %s
(RhRdtappendRRRtjointsplit(tdocsR#Rlt
class_docsRD((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pytget_scale_docss

	&
Rjt
scale_docs()ttextwraptnumpyR6RR&tcbookRttickerRRRRRRRR	R
t
transformsRRt
matplotlibR
tobjectRRR(R)R*RRRdRhRkRRpRmRttinterpdtupdateRDtreprtstrip(((sC/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/scale.pyt<module>s6	"((		q
				+