ó
º¶Y]c           @` s  d  Z  d d l m Z m Z m Z m Z d d l Z d d l Z d d l m	 Z	 d d l
 Z d d l m Z m Z d d l m Z d d l m Z d d l m Z d d	 l m Z d d
 l m Z e j e ƒ Z d Z d g Z d Z d Z d Z d Z  d Z! d e" f d „  ƒ  YZ# d S(   u6   
Module for creating Sankey diagrams using matplotlib
i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsN(   t   zip(   t   iterablet   Bunch(   t   Path(   t	   PathPatch(   t   Affine2D(   t	   docstring(   t   rcParamsu   Kevin L. Daviesu   Yannick Copinu   BSDu
   2011/09/16i   i   t   Sankeyc           B` s°   e  Z d  Z e d d d d d d d d d	 d
 d „ Z d e d d d f d „ Z d „  Z d „  Z e	 j
 d „ Z e j d e e d d d e d d f d d „	 ƒ Z d „  Z RS(   uo  
    Sankey diagram in matplotlib

      Sankey diagrams are a specific type of flow diagram, in which
      the width of the arrows is shown proportionally to the flow
      quantity.  They are typically used to visualize energy or
      material or cost transfers between processes.
      `Wikipedia (6/1/2011) <https://en.wikipedia.org/wiki/Sankey_diagram>`_

    g      ð?u    u   %Gg      Ð?gš™™™™™¹?g¸…ëQ¸ž?g333333Ã?id   gš™™™™™Ù?gíµ ÷Æ°>c         K` s‹  | d k  r t  d ƒ ‚ n  | | k r6 t  d ƒ ‚ n  |	 d k  rQ t  d ƒ ‚ n  | d k  rl t  d ƒ ‚ n  | d k r· d d l j } | j ƒ  } | j d d d d g  d	 g  ƒ} n  g  |  _ | |  _ | |  _ | |  _	 | |  _
 | |  _ | |  _ | |  _ | |  _ |
 |  _ t j t j d |	 d
 d ƒ |  _ | |  _ t j t j t j t j t j f ƒ |  _ t | ƒ r‡|  j |   n  d S(   u3  
        Create a new Sankey instance.

        Optional keyword arguments:

          ===============   ===================================================
          Field             Description
          ===============   ===================================================
          *ax*              axes onto which the data should be plotted
                            If *ax* isn't provided, new axes will be created.
          *scale*           scaling factor for the flows
                            *scale* sizes the width of the paths in order to
                            maintain proper layout.  The same scale is applied
                            to all subdiagrams.  The value should be chosen
                            such that the product of the scale and the sum of
                            the inputs is approximately 1.0 (and the product of
                            the scale and the sum of the outputs is
                            approximately -1.0).
          *unit*            string representing the physical unit associated
                            with the flow quantities
                            If *unit* is None, then none of the quantities are
                            labeled.
          *format*          a Python number formatting string to be used in
                            labeling the flow as a quantity (i.e., a number
                            times a unit, where the unit is given)
          *gap*             space between paths that break in/break away
                            to/from the top or bottom
          *radius*          inner radius of the vertical paths
          *shoulder*        size of the shoulders of output arrowS
          *offset*          text offset (from the dip or tip of the arrow)
          *head_angle*      angle of the arrow heads (and negative of the angle
                            of the tails) [deg]
          *margin*          minimum space between Sankey outlines and the edge
                            of the plot area
          *tolerance*       acceptable maximum of the magnitude of the sum of
                            flows
                            The magnitude of the sum of connected flows cannot
                            be greater than *tolerance*.
          ===============   ===================================================

        The optional arguments listed above are applied to all subdiagrams so
        that there is consistent alignment and formatting.

        If :class:`Sankey` is instantiated with any keyword arguments other
        than those explicitly listed above (``**kwargs``), they will be passed
        to :meth:`add`, which will create the first subdiagram.

        In order to draw a complex Sankey diagram, create an instance of
        :class:`Sankey` by calling it without any kwargs::

            sankey = Sankey()

        Then add simple Sankey sub-diagrams::

            sankey.add() # 1
            sankey.add() # 2
            #...
            sankey.add() # n

        Finally, create the full diagram::

            sankey.finish()

        Or, instead, simply daisy-chain those calls::

            Sankey().add().add...  .add().finish()

        .. seealso::

            :meth:`add`
            :meth:`finish`


        **Examples:**

            .. plot:: gallery/api/sankey_basics.py
        i    uT   The gap is negative.
This isn't allowed because it would cause the paths to overlap.ur   The inner radius is greater than the path spacing.
This isn't allowed because it would cause the paths to overlap.ul   The angle is negative.
This isn't allowed because it would cause inputs to look like outputs and vice versa.u2   The tolerance is negative.
It must be a magnitude.Ni   t   xtickst   yticksg     €f@g       @(   t
   ValueErrort   Nonet   matplotlib.pyplott   pyplott   figuret   add_subplott   diagramst   axt   unitt   formatt   scalet   gapt   radiust   shouldert   offsett   margint   npt   tant   pit   pitcht	   tolerancet   arrayt   inft   extentt   lent   add(   t   selfR   R   R   R   R   R   R   R   t
   head_angleR   R#   t   kwargst   pltt   fig(    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyt   __init__-   s>    Q$										%	,i    i   c      	   C` s¡  t  j t  j t  j t  j t  j t  j t  j g } t j d d g d d g d d g d d g d d g d d g d d g g ƒ } | d k s– | d k rÇ | r¥ | } qW| d	 d	 … d	 d	 d
 … f } n | d k sß | d k rW| rt j | d	 d	 … d f | d	 d	 … d f f ƒ } qWt j | d	 d	 … d f | d	 d	 … d f f ƒ } n  | d k rm| } n  t t | | | t j | | j	 d d f ƒ ƒ ƒ S(   u=  
        Return the codes and vertices for a rotated, scaled, and translated
        90 degree arc.

        Optional keyword arguments:

          ===============   ==========================================
          Keyword           Description
          ===============   ==========================================
          *quadrant*        uses 0-based indexing (0, 1, 2, or 3)
          *cw*              if True, clockwise
          *center*          (x, y) tuple of the arc's center
          ===============   ==========================================
        g      ð?g        gw,îó£÷Ð?gùÈÚS ì?gƒ¢òè à?g>˜efž æ?i    i   Niÿÿÿÿi   i   (
   R   t   LINETOt   CURVE4R   R$   t   column_stackt   listR   t   tilet   shape(   R)   t   quadrantt   cwR   t   centert	   ARC_CODESt   ARC_VERTICESt   vertices(    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyt   _arc«   s8    						"
c         C` s¾  | d
 k r" d d g d d g f S| d d \ } } | d |  j } | t k rñ | | 8} | | | | d g } | j t j | | g f t j | f t j | | | g f t j | |  j | | g f g ƒ | d |  j | d g }	 n¿| |  j 8} | t k rd }
 n d }
 | | d | |
 | | g } | t	 k rNd } n d } |  j
 r¬| j |  j d | d | t k d |  j
 d	 | |  j
 | |
 |  j
 f ƒ ƒ n | j t j | | g f ƒ | j t j | | |
 | g f t j | f t j | | | |
 | g f g ƒ | j |  j d | d | t	 k d | |  j
 d	 | |  j
 | |
 |  j
 f ƒ ƒ | j t j | | | |
 | g f ƒ | d | d |
 |  j g }	 | |	 f Sd
 S(   uP   
        Add an input to a path and return its tip and label locations.
        i    iÿÿÿÿi   i   g       @R5   R6   R   R7   N(   R   R"   t   RIGHTt   extendR   R/   R   R   t   UPt   DOWNR   R;   t   append(   R)   t   patht   anglet   flowt   lengtht   xt   yt   dipdeptht   dipt   label_locationt   signR5   (    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyt
   _add_inputâ   sL    
$	 			
 %
(c         C` sA  | d k r" d d g d d g f S| d d \ } } |  j | d |  j } | t k r.| | 7} | | | | d g } | j t j | | g f t j | | |  j g f t j | f t j | | |  j | g f t j | | | g f t j | |  j | | g f g ƒ | d |  j | d g }	 n| |  j 7} | t	 k rPd }
 n d }
 | | d | |
 | | g } | t	 k r‹d } n d } |  j
 ré| j |  j d | d | t	 k d	 |  j
 d
 | |  j
 | |
 |  j
 f ƒ ƒ n | j t j | | g f ƒ | j t j | | |
 | g f t j | |  j | |
 | g f t j | f t j | |  j | | |
 | g f t j | | | |
 | g f g ƒ | j |  j d | d | t k d	 |  j
 | d
 | |  j
 | |
 |  j
 f ƒ ƒ | j t j | | | |
 | g f ƒ | d | d |
 |  j g }	 | |	 f Sd S(   u‰   
        Append an output to a path and return its tip and label locations.

        .. note:: *flow* is negative for an output.
        i    iÿÿÿÿi   i   g       @i   R5   R6   R   R7   N(   R   R   R"   R<   R=   R   R/   R   R   R>   R   R;   R@   R?   (   R)   RA   RB   RC   RD   RE   RF   t	   tipheightt   tipRI   RJ   R5   (    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyt   _add_output  sX    
$	 			
 %
(c         C` sM   g  } | } x: | d d d … D]% \ } } | j  | | f ƒ | } q  W| S(   u   
        A path is not simply revertable by path[::-1] since the code
        specifies an action to take from the **previous** point.
        Niÿÿÿÿ(   R@   (   R)   RA   t   first_actiont   reverse_patht	   next_codet   codet   position(    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyt   _revertP  s     
c
   8      K` sj  | d" k r$ t j d d g ƒ } n t j | ƒ } | j d } |	 d" k rU d }	 n
 |	 d }	 | d" k rz d d g } n  t | ƒ | k r« t d t | ƒ | f ƒ ‚ n  | d k rý t | d t ƒ rý t | ƒ | k r
t d t | ƒ | f ƒ ‚ q
n | g | } | d k  r%t d	 ƒ ‚ n  t j t j	 | ƒ ƒ |  j
 k rbt j d
 t j	 | ƒ ƒ n  |  j | } t	 d „  | Dƒ ƒ } t	 d „  | Dƒ ƒ } d | k o²d k n sÊt j d | ƒ n  d | k oád k n sùt j d | ƒ n  | d" k	 r…| d k  r t d ƒ ‚ n  t | ƒ d k  rAt d ƒ ‚ n  | t |  j ƒ k rxt d | t |  j ƒ f ƒ ‚ n  | d t |  j | j ƒ k rÅt d | d t |  j | j ƒ f ƒ ‚ n  | d | k ròt d | d | f ƒ ‚ n  |  j | j | d d" k r-t d | d | f ƒ ‚ n  |  j | j | d | | d } t | ƒ |  j
 k r…t d | |  j
 f ƒ ‚ q…n  d" g | } xp t | ƒ D]b \ } } | |  j
 k rÇt | | <qŸ| |  j
 k rät | | <qŸt j d | | |  j
 f ƒ qŸWd" g | } xÑ t t | | ƒ ƒ D]º \ } \ } } | d k ro| rYt | | <qâ| sât | | <qâq(| d k r—| d" k	 rât | | <qâq(| d k r¼t d | | f ƒ ‚ n  | rÏt | | <q(| s(t | | <q(q(Wt | ƒ r&t | ƒ | k r–t d t | ƒ | f ƒ ‚ q–np| } | } | } | } t d | ƒ } g  | D] } | j | d ƒ ^ qT} x‚ t t | | | ƒ ƒ D]h \ } \ } } } | t k rÉ| rÉ| | | <| | 7} q‹| t k r‹| r‹| | | <| | 8} q‹q‹Wxž t t t t | | | ƒ ƒ ƒ ƒ D]x \ } \ } } } | t k rb| rb| | | | d <| | 7} q| t k r| r| | | | d <| | 8} qqWt } x} t t t t | | t | | ƒ ƒ ƒ ƒ ƒ D]N \ } \ } } } | t k rÌ| r| rd | | | d <qt } qqÌqÌWt } xo t t | | t t | | ƒ ƒ ƒ ƒ D]F \ } \ } } } | t k rL| s’| r†d | | <qt } q’qLqLWt j |  j | d | d g f t j  |  j | d d | d g f t j! |  j | d d  | d g f t j! | d |  j d  | d g f t j  | d |  j d | d g f t j  | d |  j | d g f g } t j  | d |  j | d g f t j  | d |  j d | d g f t j! | d |  j d  | d g f t j! |  j | d d  | d g f t j  |  j | d d | d g f t j  |  j | d | d g f g }  t j  | d |  j | d g f g }! t j  |  j | d | d g f g }" t j" | d! f ƒ }# t j" | d! f ƒ }$ xß t t | | t t | | ƒ ƒ ƒ ƒ D]¶ \ } \ } } } | t k rY
| rY
|  j# |" | | Œ \ |# | d" d" … f <|$ | d" d" … f <qô	| t k rô	| rô	|  j$ | | | Œ \ |# | d" d" … f <|$ | d" d" … f <qô	qô	Wx#t t t t | | t t | | ƒ ƒ ƒ ƒ ƒ ƒ D]î \ } \ } } } | t k rc| rc|  j# |  | | Œ \ }% }& |% |# | | d d" d" … f <|& |$ | | d d" d" … f <qâ
| t k râ
| râ
|  j$ |! | | Œ \ }% }& |% |# | | d d" d" … f <|& |$ | | d d" d" … f <qâ
qâ
Wt } x t t t t | | t t | | ƒ ƒ ƒ ƒ ƒ ƒ D]ë \ } \ } } } | t k r| r| sŸ|  d d d |" d d d k r–|  j% t j  |" d d d |  d d d g f ƒ n  t } n  |  j# |  | | Œ \ }% }& |% |# | | d d" d" … f <|& |$ | | d d" d" … f <qqWt } xù t t | | t t | | ƒ ƒ ƒ ƒ D]Ð \ } \ } } } | t k r+| r+| s½| d d d |! d d d k  r´| j% t j  |! d d d | d d d g f ƒ n  t } n  |  j$ | | | Œ \ |# | d" d" … f <|$ | d" d" … f <q+q+W| s|" j& ƒ  |  j& ƒ  n  | s9|! j& ƒ  | j& ƒ  n  | |  j' |! ƒ |  |  j' |" ƒ t j( | d d f g }' t |' Œ  \ }( }) t j |) ƒ }) d# „  }* | d" k rC|	 d k rg  | D] } |* | |	 ƒ ^ q¾} t) ƒ  j* |	 d$ ƒ j+ }+ |+ |# ƒ }# |+ |$ ƒ }$ |+ |) ƒ }) n  |  j, j- d d d% | d& d' d( d' ƒ}, n|  j | j | d | | d }	 g  | D] } |* | |	 ƒ ^ qn} t) ƒ  j* |	 d$ ƒ j+ }+ |+ |# ƒ }# |  j | j. | d |# | d }- t) ƒ  j/ |- Œ  j+ }. |. |# ƒ }# |. |+ |$ ƒ ƒ }$ |. |+ |) ƒ ƒ }) t d% | d& d' d( d' ƒ }/ |  j, j- |- |/ Ž  }, t0 d) r|
 j& d* |
 j& d+ d, ƒ ƒ }0 |
 j& d- |
 j& d. d ƒ ƒ }1 n< |
 j& d* |
 j& d+ d" ƒ ƒ }0 |
 j& d- |
 j& d. d" ƒ ƒ }1 |0 d" k rôt1 |  j, j2 j3 ƒ d/ }0 n  t4 t |) |( ƒ d0 |0 d1 |1 |
 }2 |  j, j5 |2 ƒ g  }3 xÕ t | | | |$ ƒ D]¾ \ }4 } }5 }6 |5 d" k sn| d" k rwd }5 nO |  j6 d" k	 rÆ|  j7 t |4 ƒ |  j6 }7 |5 d k r¹|5 d2 7}5 n  |5 |7 7}5 n  |3 j% |  j, j- d3 |6 d d4 |6 d d% |5 d& d' d( d' ƒ ƒ qDWt t j |) d" d" … d f ƒ t j |$ d" d" … d f ƒ |  j8 d ƒ t9 t j9 |) d" d" … d f ƒ t j9 |$ d" d" … d f ƒ |  j8 d ƒ t t j |) d" d" … d f ƒ t j |$ d" d" … d f ƒ |  j8 d! ƒ t9 t j9 |) d" d" … d f ƒ t j9 |$ d" d" … d f ƒ |  j8 d5 ƒ f |  _8 |  j j% t: d6 |2 d7 | d8 | d9 |# d: |, d; |3 ƒ ƒ |  S(<   u  
        Add a simple Sankey diagram with flows at the same hierarchical level.

        Return value is the instance of :class:`Sankey`.

        Optional keyword arguments:

          ===============   ===================================================
          Keyword           Description
          ===============   ===================================================
          *patchlabel*      label to be placed at the center of the diagram
                            Note: *label* (not *patchlabel*) will be passed to
                            the patch through ``**kwargs`` and can be used to
                            create an entry in the legend.
          *flows*           array of flow values
                            By convention, inputs are positive and outputs are
                            negative.
          *orientations*    list of orientations of the paths
                            Valid values are 1 (from/to the top), 0 (from/to
                            the left or right), or -1 (from/to the bottom).  If
                            *orientations* == 0, inputs will break in from the
                            left and outputs will break away to the right.
          *labels*          list of specifications of the labels for the flows
                            Each value may be *None* (no labels), '' (just
                            label the quantities), or a labeling string.  If a
                            single value is provided, it will be applied to all
                            flows.  If an entry is a non-empty string, then the
                            quantity for the corresponding flow will be shown
                            below the string.  However, if the *unit* of the
                            main diagram is None, then quantities are never
                            shown, regardless of the value of this argument.
          *trunklength*     length between the bases of the input and output
                            groups
          *pathlengths*     list of lengths of the arrows before break-in or
                            after break-away
                            If a single value is given, then it will be applied
                            to the first (inside) paths on the top and bottom,
                            and the length of all other arrows will be
                            justified accordingly.  The *pathlengths* are not
                            applied to the horizontal inputs and outputs.
          *prior*           index of the prior diagram to which this diagram
                            should be connected
          *connect*         a (prior, this) tuple indexing the flow of the
                            prior diagram and the flow of this diagram which
                            should be connected
                            If this is the first diagram or *prior* is *None*,
                            *connect* will be ignored.
          *rotation*        angle of rotation of the diagram [deg]
                            *rotation* is ignored if this diagram is connected
                            to an existing one (using *prior* and *connect*).
                            The interpretation of the *orientations* argument
                            will be rotated accordingly (e.g., if *rotation*
                            == 90, an *orientations* entry of 1 means to/from
                            the left).
          ===============   ===================================================

        Valid kwargs are :meth:`matplotlib.patches.PathPatch` arguments:

        %(Patch)s

        As examples, ``fill=False`` and ``label='A legend entry'``.
        By default, ``facecolor='#bfd1d4'`` (light blue) and
        ``linewidth=0.5``.

        The indexing parameters (*prior* and *connect*) are zero-based.

        The flows are placed along the top of the diagram from the inside out
        in order of their index within the *flows* list or array.  They are
        placed along the sides of the diagram from the top down and along the
        bottom from the outside in.

        If the sum of the inputs and outputs is nonzero, the discrepancy
        will appear as a cubic Bezier curve along the top and bottom edges of
        the trunk.

        .. seealso::

            :meth:`finish`
        g      ð?g      ð¿i    g     €V@uf   orientations and flows must have the same length.
orientations has length %d, but flows has length %d.u    u   __iter__ut   If labels is a list, then labels and flows must have the same length.
labels has length %d, but flows has length %d.uP   trunklength is negative.
This isn't allowed, because it would cause poor layout.uH   The sum of the flows is nonzero (%f).
Is the system not at steady state?c         s` s   |  ] } t  | d  ƒ Vq d S(   i    N(   t   max(   t   .0RC   (    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pys	   <genexpr>Ù  s    c         s` s   |  ] } t  | d  ƒ Vq d S(   i    N(   t   min(   RV   RC   (    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pys	   <genexpr>Ú  s    g      à?g       @uˆ   The scaled sum of the inputs is %f.
This may cause poor layout.
Consider changing the scale so that the scaled sum is approximately 1.0.g       Àg      à¿u‰   The scaled sum of the outputs is %f.
This may cause poor layout.
Consider changing the scale so that the scaled sum is approximately 1.0.u+   The index of the prior diagram is negative.u3   At least one of the connection indices is negative.ud   The index of the prior diagram is %d, but there are only %d other diagrams.
The index is zero-based.un   The connection index to the source diagram is %d, but that diagram has only %d flows.
The index is zero-based.i   uh   The connection index to this diagram is %d, but this diagramhas only %d flows.
 The index is zero-based.u†   The connection cannot be made.  Check that the magnitude of flow %d of diagram %d is greater than or equal to the specified tolerance.uT   The scaled sum of the connected flows is %f, which is not within the tolerance (%f).uw   The magnitude of flow %d (%f) is below the tolerance (%f).
It will not be shown, and it cannot be used in a connection.iÿÿÿÿuC   The value of orientations[%d] is %d, but it must be [ -1 | 0 | 1 ].uƒ   If pathlengths is a list, then pathlengths and flows must have the same length.
pathlengths has length %d, but flows has length %d.R<   g       @i   Nc         S` s   |  d  k r d  S|  | Sd  S(   N(   R   (   t   at   r(    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyt
   _get_angleÆ  s    iZ   t   st   hau   centert   vau   _internal.classic_modeu   fcu	   facecoloru   #bfd1d4u   lwu	   linewidthu   colort   fct   lwu   
RE   RF   i   t   patcht   flowst   anglest   tipst   textt   texts(;   R   R   R$   R4   R'   R   t   getattrt   Falset   abst   sumR#   t   _logt   infoR   RW   R   Ra   Rb   t	   enumeratet   TrueR   R?   R>   R<   R   t   dictt   gett   reversedR2   R   t   MOVETOR   R/   R0   t   zerosRK   RN   R@   t   popRT   t	   CLOSEPOLYR	   t
   rotate_degt   transform_affineR   Rd   Rc   t	   translateR   t   nextt   _get_patches_for_fillt   prop_cyclerR   t	   add_patchR   R   R&   RU   R   (8   R)   t
   patchlabelRa   t   orientationst   labelst   trunklengtht   pathlengthst   priort   connectt   rotationR+   t   nt   scaled_flowst   gaint   losst
   flow_errort
   are_inputst   iRC   Rb   t   orientt   is_inputt   urlengtht   ullengtht   lrlengtht   lllengtht   dRB   t   has_left_inputt   spect   has_right_outputt   urpatht   llpatht   lrpatht   ulpathRc   t   label_locationsRM   RI   RA   t   codesR:   RZ   t   rotateRd   R   Rw   t   kwdsR^   R_   R`   Re   t   numbert   labelt   locationt   quantity(    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyR(   b  s"   T	
!	

 '(%

+4	4	48<:!%:$	%	4$	<

!	"*"$
!$	&!c         C` sq   |  j  j |  j d |  j |  j d |  j |  j d |  j |  j d |  j g ƒ |  j  j d d d ƒ|  j S(   uÑ  
        Adjust the axes and return a list of information about the Sankey
        subdiagram(s).

        Return value is a list of subdiagrams represented with the following
        fields:

          ===============   ===================================================
          Field             Description
          ===============   ===================================================
          *patch*           Sankey outline (an instance of
                            :class:`~maplotlib.patches.PathPatch`)
          *flows*           values of the flows (positive for input, negative
                            for output)
          *angles*          list of angles of the arrows [deg/90]
                            For example, if the diagram has not been rotated,
                            an input to the top side will have an angle of 3
                            (DOWN), and an output from the top side will have
                            an angle of 1 (UP).  If a flow has been skipped
                            (because its magnitude is less than *tolerance*),
                            then its angle will be *None*.
          *tips*            array in which each row is an [x, y] pair
                            indicating the positions of the tips (or "dips") of
                            the flow paths
                            If the magnitude of a flow is less the *tolerance*
                            for the instance of :class:`Sankey`, the flow is
                            skipped and its tip will be at the center of the
                            diagram.
          *text*            :class:`~matplotlib.text.Text` instance for the
                            label of the diagram
          *texts*           list of :class:`~matplotlib.text.Text` instances
                            for the labels of flows
          ===============   ===================================================

        .. seealso::

            :meth:`add`
        i    i   i   i   u   equalt
   adjustableu   datalim(   R   t   axisR&   R   t
   set_aspectR   (   R)   (    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyt   finish  s    '(   t   __name__t
   __module__t   __doc__R   R.   Rm   R;   RK   RN   R   R/   RT   R
   t   dedent_interpdR(   R¤   (    (    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyR   !   s   
|7	4	:ÿ ±($   R§   t
   __future__R    R   R   R   t   sixt   loggingt	   six.movesR   t   numpyR   t   matplotlib.cbookR   R   t   matplotlib.pathR   t   matplotlib.patchesR   t   matplotlib.transformsR	   t
   matplotlibR
   R   t	   getLoggerR¥   Rj   t
   __author__t   __credits__t   __license__t   __version__R<   R>   R?   t   objectR   (    (    (    s0   lib/python2.7/site-packages/matplotlib/sankey.pyt   <module>   s(   "	