
@wOGc           @   s  d  Z  d d k l Z d d k Z d d k Z d d k Z d d k i	 i
 Z d d k i Z d d k i Z d d k i Z d d k i Z d d k i Z d d k i Z d d k i Z d d k i Z d d k i Z d f  d     YZ d e i e f d     YZ  d S(   sQ   
These are  classes to support contour plotting and
labelling for the axes class
i(   t   divisionNt   ContourLabelerc           B   sh   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z RS(   s3   Mixin to provide labelling capability to ContourSetc         O   s  | i  d d  } | i  d d  } | i  d d  |  _ | i  d d  } t |  d j o" |  i } t t |  i   } n t |  d j o t | d  } g  g  } } xH t |  i  D]7 \ }	 }
 |
 | j o | i |	  | i |
  q q Wt |  t |  j  o= d t	 |  } | d	 7} | t	 |  i  7} t
 |   qan t d
   | |  _ | |  _ t i   |  _ | d j o t |  i i    } no t |  t t t	 g j o t d   nC t |  t	 j o t |  i i    } n |  i i |  | } | g t |  |  _ | d j o( |  |  _ t i |  i |  i  |  _ nX t i | d t |  i  } t t |  i   |  _ t i d | d t i     |  _ g  |  _! |  i" |  x! |  i# D] } |  i$ i% |  qWt& i' d |  i#  |  _( |  i( S(   s  
        clabel(CS, **kwargs) - add labels to line contours in CS,
               where CS is a ContourSet object returned by contour.

        clabel(CS, V, **kwargs) - only label contours listed in V

        keyword arguments:

        * fontsize = None: as described in http://matplotlib.sf.net/fonts.html

        * colors = None:

           - a tuple of matplotlib color args (string, float, rgb, etc),
             different labels will be plotted in different colors in the order
             specified

           - one string color, e.g. colors = 'r' or colors = 'red', all labels
             will be plotted in this color

           - if colors == None, the color of each label matches the color
             of the corresponding contour

        * inline = True: controls whether the underlying contour is removed
                     (inline = True) or not (False)

        * fmt = '%1.3f': a format string for the label

        t   fontsizet   inlinei   t   fmts   %1.3ft   colorsi    s   Specified levels s   
 don't match available levels s-   Illegal arguments to clabel, see help(clabel)s$   Font size must be an integer number.t   Nt   cmapt   norms	   text.TextN()   t   gett   NoneR   t   lent   levelst   ranget   listt	   enumeratet   appendt   strt
   ValueErrort	   TypeErrort   label_levelst   label_indicest   font_managert   FontPropertiest   fpt   intt   get_size_in_pointst   typet   floatt   set_sizet   fslistt   label_mappablet   npyt   taket   cvaluest   label_cvaluesR   t   ListedColormapt   cmt   ScalarMappablet   NoNormt   cl_xyt   labelst   clt   axt
   add_artistt   cbookt   silent_listt
   label_list(   t   selft   argst   kwargsR   R   t   _colorsR   t   indicest   levlabst   it   levt   msgt	   font_sizeR   t   label(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   clabel   s^    	 
				
 c   	      C   s  t  |  } | d | j o d Sn t i t i |  d d  d f  } t i t i |  d d  d f  } t i t i |  d d  d f  } t i t i |  d d  d f  } | } | | d | j p | | d | j o d Sn d Sd S(   s-   if contours are too short, don't plot a labeli
   i   Ni    g333333?(   R   R    t   amaxt   arrayt   amin(	   R0   t   linecontourt
   labelwidtht   lcsizet   xmaxt   xmint   ymaxt   ymint   lw(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   print_label|   s    ((((*c         C   s   |  i  g  j o{ g  } |  i  D]2 } | t i | | d d | | d d  q ~ } x3 | D]# } | d | j  o d Sq` d Sq` Wn d Sd S(   s6   if there's a label already nearby, find a better placei    i   i   g333333?N(   R(   R    t   sqrt(   R0   t   xt   yRF   t   _[1]t   loct   distt   d(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt	   too_close   s    B c         C   s   t  | d  } t i |  } xk | D]c } | | | | | | }	 }
 |  i |	 |
 |  o q& q& |  i i |	 |
 f  |	 |
 | f Sq& W| d } | | | | | | }	 }
 |  i i |	 |
 f  |	 |
 | f S(   sB   labels are ploted at a location with the smallest
        dispersion of the contour from a straight line
        unless there's another label nearby, in which case
        the second best place on the contour is picked up
        if there's no good place a label isplotted at the
        beginning of the contour
        i   i    (   R   R    t   argsortRO   R(   R   (   R0   t	   distancest   XXt   YYt   ysizeRF   t   hysizet   adistt   indRI   RJ   (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   get_label_coords   s    	 
c         C   s<   t  i |  o t |  | } n t | |  | } | S(   s$   get the width of the label in points(   R-   t   is_string_likeR   (   R0   R7   R   t   fsizeRF   (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   get_label_width   s    c         C   sA   | i  |  | i |  | i |  i  | i |  i i  d S(   s0   set the label properties - color, fontsize, textN(   t   set_textt	   set_colort   set_fontpropertiesR   t   set_clip_boxR+   t   bbox(   R0   R:   t   textt   color(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   set_label_props   s    c         C   s$   t  i |  o | Sn	 | | Sd S(   s   get the text of the labelN(   R-   RY   (   R0   R7   R   (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   get_text   s    c         C   s%  t  |  } t | d  } t | t i | t i d   } t | t i | t i d   } |  i i }	 |	 i	 |  }
 |
 | \ } } t i
 |
  d d  d f i   } t i
 |
  d d  d f i   } t i | | | j  | | | j @| | | j  | | | j @@ \ } t  |  d j o t i | d | d  d j  \ } | d d j oD t  |  d j o1 | | d } | | d | | d !} g  } q| | d  } | | d d } n | |  } | | d } | d j  o. | | | | } } | | | | } } n+ | | | | } } | | | | } } |	 i | | f  \ } } |	 i | | f  \ } } t i | | f f  } t i | | f f  } | d j o t  |  d j oC | d d | j o. | d d | j o t i | | f  } n t  |  d j oC | d d | j o. | d d | j o t i | | f  } qn t  |  d j oC | d d | j o. | d d | j o t i | | f  } n t  |  d j oC | d d | j o. | d d | j o t i | | f  } n | | g S(   s<   break a contour in two contours at the location of the labeli   i   Ni    i   i(   R   R   t   absR    t   sint   pit   cosR+   t	   transDatat   seq_xy_tupst   asarrayt   copyt   nonzerot   inverse_xy_tupR=   t   concatenate(   R0   R?   t   rotR@   RW   RA   t   hlwt   ylabelt   xlabelt   transt   slcRI   RJ   t   xxt   yyt   indst   lindst   iit   lc1t   lc2t   new_x1t   new_y1t   new_x2t   new_y2t   new_x1dt   new_y1dt   new_x2dt   new_y2dt   new_xy1t   new_xy2(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   break_linecontour   sX    $$%%!%$$

((((c         C   s  t  |  } | d j o t t i | |   } n d } | d j o
 | } n | } t i t i |  d d  d f | | f  } t i t i |  d d  d f | | f  } | d d  d f i | d  } | d d  d f i | d  }	 | d d  d f i | d  }
 | d d  d f i | d  } | | | |
 |
 | |	 | } t i | |
 d |	 | d  i   } t i	 i
 g  } t |  D] } | t |  | | | q~ d  } |  i | | | | |  \ } } } t i |	 | | |
  i   } | | d t i } | d j o | d } n | d j  o d | } n g  } | D] } | t |  qp~ } | i | | f  } | | | | f S(	   s   find a good place to plot a label (relatively flat
        part of the contour) and the angle of rotation for the
        text object
        i   Ni    ii   i   iZ   i(   R   R   R    t   ceilt   resizeRk   t   reshapeRH   t   ravelt   addt   reduceR   Re   RX   t   arctan2Rg   t   tuplet   index(   R0   R?   R@   t   nsizet   xsizeRT   RR   RS   t   yfirstt   ylastt   xfirstt   xlastt   st   LRK   R6   RM   RI   RJ   RW   t   anglet   rotationt   _[2]t   lt   lct   dind(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   locate_label  s4    
11""""")H$ 'c         C   s.  |  i  } |  i } |  i i } |  i i |  i  } |  i } xt |  i	 |  i  | |  i |  D]\ } } }	 }
 } |  i
 | } |  i | | |  } g  } xxt | i  D]g\ } } t i | d | d j  o0 t i | | d t i d  d   f f  } n | i |  } |  i | |  o |  i | |  \ } } } } | i | | f  \ } } t i | | d | d d d d } |  i | |  } |  i | | |	  |  i i |  |  i i |
  | o> |  i | | | |  } | d | i | <| i | d  qq q W| i i |  q^ Wd  S(   Ni    ii   R   t   horizontalalignmentt   centert   verticalalignment(   R   R   R+   Ri   R   t   to_rgbaR#   R   t   zipR   t   collectionsR[   R   t	   _segmentsR    t   allRo   t   newaxisRj   RG   R   Rn   Ra   t   TextRd   Rc   R*   R   t
   cl_cvaluesR   t   extend(   R0   R   R   R   Rt   R3   R   t   iconR7   Rb   t   cvalueRZ   t   conRF   t	   additionst   segNumR?   Ru   RI   RJ   R   RW   t   dxt   dyt   tt   _textt   new(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyR)   C  sF    			  	'	(   t   __name__t
   __module__t   __doc__R;   RG   RO   RX   R[   Rc   Rd   R   R   R)   (    (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyR      s   	]				
			N	+t
   ContourSetc           B   sw   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d Z RS(   s  
    Create and store a set of contour lines or filled regions.

    User-callable method: clabel

    Useful attributes:
        ax - the axes object in which the contours are drawn
        collections - a silent_list of LineCollections or PolyCollections
        levels - contour levels
        layers - same as levels for line contours; half-way between
                 levels for filled contours.  See _process_colors method.
    c      
   O   s  | |  _  | i d d(  |  _ | i d t  |  _ | i d d(  |  _ | i d d  |  _ | i d d  |  _ | i d d(  |  _	 | i d	 d(  |  _
 | i d
 d(  } | i d d(  |  _ | i d d(  } | i d d  |  _ | i d t  |  _ | i d d  |  _ | i d d(  |  _ t | t i  p t |  i t i  oJ t |  _ | d( j o t i   } n |  i d j	 o t d   qn
 t |  _ |  i	 d( j	 o |  i	 d) j p t  n |  i
 d( j	 o! t |  i
  d j p t  n | d( j	 o t | t i  p t  n |  i d( j	 o | d( j	 o t d   n |  i	 d j o t i d |  _	 n |  i |   \ } } } |  i d( j	 o% t i |  i d t |  i  } n |  i o t i  d  |  _! n t i  d  |  _! g  |  _" g  |  _# h  | d
 <}	 | d( j	 o | |	 d <n t$ i% i& |  |	  |  i'   t( i) |  }
 |
 t( i* j o
 d( }
 n |  i o |  i d( j	 o t+ i, d  n t- i. | | | i   |
  } |  i/ d  } |  i/ d } x}t0 | |  D]n \ } } | i1 | | d  d d |  i } t! i2 | d! |  i f d" d# } |  i  i3 |  |  i! i4 |  qWn |  i5   } | |  _6 |  i7   } t- i. | | | i   |
  } x t0 |  i | |  D] \ } } } | i1 | d  d } t! i8 | d | d$ | } | d% j  o( |  i9 o t i d& } | i: |  n | i; d'  |  i  i3 |  |  i! i4 |  qW|  i<   t( i= |  } t( i> |  } t( i= |  } t( i> |  } |  i  i? | | f | | f g  |  i  i@ | | f  |  i  iA | | f  d( S(*   s5  
        Draw contour lines or filled regions, depending on
        whether keyword arg 'filled' is False (default) or True.

        The first argument of the initializer must be an axes
        object.  The remaining arguments and keyword arguments
        are described in ContourSet.contour_doc.

        R   t   filledt
   linewidthst
   linestylest   solidt   alphag      ?t   origint   extentR   R   R   R   t   neithert   antialiasedt   nchunki    t   locators-   extend kwarg does not work yet with log scalet   lowert   uppert   imagei   s"   Either colors or cmap must be Nones   image.originR   s   collections.PolyCollections   collections.LineCollections!   linewidths is ignored by contourfii   t   pointst   antialiasedst
   edgecolorsR
   t	   linestyleg        s   contour.negative_linestylet
   _nolegend_N(   s   lowers   uppers   image(B   R+   R	   R
   R   t   FalseR   R   R   R   R   R   R   R   t   TrueR   R   R   t
   isinstancet   LogNormt   tickert
   LogLocatort   logscaleR   t   AssertionErrorR   t   Colormapt   mplt   rcParamst   _contour_argsR$   t   layersR-   R.   R   R*   R   R%   R&   t   __init__t   _process_colorst   mat   getmaskt   nomaskt   warningst   warnt   _cntrt   Cntrt   _levelsR   t   tracet   PolyCollectiont   add_collectionR   t   _process_linewidthst   tlinewidthst   _process_linestylest   LineCollectiont
   monochromet   set_linestylet	   set_labelt   changedt   minimumt   maximumt   update_datalimt   set_xlimt   set_ylim(   R0   R+   R1   R2   R   R   RI   RJ   t   zt   kwt   _maskt   Ct   lowerst   upperst   levelt   level_uppert   nlistt   colR   t   tlinestylest   widtht   lstylet   lst   x0t   x1t   y0t   y1(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyR   {  s    
			1+$%
		


 		 	
"c         C   s   g  } |  i  |  i d |  i D] } | t |  f q  ~ } | |  _ x- t | |  i  D] \ } } | i |  q[ Wx< t |  i |  i	  D]% \ } } | i |  i
 i  |   q Wt i i |   d  S(   NR   (   R   R"   R   R   t   tcolorsR   R   R]   R*   R   R   R%   R&   R   (   R0   RK   t   rgbaR  Rb   t
   collectionR:   t   cv(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyR     s    8	  c         C   s  |  i  d j o7 |  i o t i   |  _  qG t i | d  |  _  n |  i  } |  i } |  i } | i | |  |   } | | d } | | d j o | d c | 7<n | | d j o0 |  i o d | | d <q | d c | 8<n t	 |  _
 |  i o | Sn | d d !S(   s  
        Select contour levels to span the data.

        We need two more levels for filled contours than for
        line contours, because for the latter we need to specify
        the lower and upper boundary of each range. For example,
        a single contour boundary, say at z = 0, requires only
        one contour line, but two filled regions, and therefore
        three levels to provide boundaries for both regions.
        i   gư>ii    gGz?N(   R   R
   R   R   R   t   MaxNLocatort   zmaxt   zmint
   set_boundsR   t   _autoR   (   R0   R   R   R   R  R  R7   t   zmargin(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   _autolev  s(    
				
	
c         C   s  | i  d j o t d   n | i \ } } |  i d j o |  i d j o& t i t i |  t i |   Sq |  i \ } } } } t i	 | | |  } t i	 | | |  }	 t i | |	  Sn |  i d j o" d | d | f \ } } } } n |  i \ } } } } t
 | |  | }
 t
 | |  | } | t i |  d |
 } | t i |  d | }	 |  i d j o |	 d d d  }	 n t i | |	  S(   s  
        Return X, Y arrays such that contour(Z) will match imshow(Z)
        if origin is not None.
        The center of pixel Z[i,j] depends on origin:
        if origin is None, x = j, y = i;
        if origin is 'lower', x = j + 0.5, y = i + 0.5;
        if origin is 'upper', x = j + 0.5, y = Nrows - i - 0.5
        If extent is not None, x and y will be scaled to match,
        as in imshow.
        If origin is None and extent is not None, then extent
        will give the minimum and maximum values of x and y.
        i   s   Input must be a 2D array.i    g      ?R   Ni(   t   ndimR   t   shapeR   R
   R   R    t   meshgridt   aranget   linspaceR   (   R0   R   t   Nyt   NxR  R  R  R  RI   RJ   R   R   (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt   _initialize_x_y  s(    &"c   	      C   sU  t  i | d d t  i } t  i | d d t  i } t i | d d t  i } | i d j o t d   n | i \ } } | i | i j o$ | i | i j o | | | f Sn | i d j p | i d j o t d   n | i \ } | i \ } | | j p | | j o t d d   n t  i | |  \ } } | | | f S(	   s   
        For functions like contour, check that the dimensions
        of the input arrays match; if x and y are 1D, convert
        them to 2D using meshgrid.

        Possible change: I think we should make and use an ArgumentError
        Exception class (here and elsewhere).
        i    t   dtypei   i   s   Input z must be a 2D array.s    Inputs x and y must be 1D or 2D.s,   Length of x must be number of columns in z,
s'   and length of y must be number of rows.(   R    Rk   t   float64R   R  R   R  R  (	   R0   R1   RI   RJ   R   R  R  t   nxt   ny(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt
   _check_xyz8  s"    	& c   	   
   G   s  |  i  o
 d } n d } t |  } | d j o5 t i | d d t i } |  i |  \ } } nD | d j o  |  i | d   \ } } } n t d | | f   t i	 |  |  _
 t i |  |  _ |  i oH |  i d j o8 t i | d j |  } t i d	  | i   |  _ n t |  _ |  i d  j o | d
 j p | d j o |  i | d  } ns | d } yH t |  t j o |  i | |  } n t i |  i t i  } Wn t d | | f   n X|  i  o# t |  d j  o t d   n | |  _ n t |  i  |  _ |  i d j o. |  i i d t |  i d |  i  d
  n |  i d j o+ |  i i t  |  i d |  i
  d
  n t i |  i  |  _ t i! |  i  |  _" t i# |  i  |  _$ |  i d j o# d |  i d |  i d
 |  _" n |  i d j o# d |  i d |  i d |  _$ n |  i |  _% |  i  o d |  i d  |  i d
 |  _% |  i d j o# d |  i" |  i d
 |  i% d <n |  i d j o# d |  i$ |  i d |  i% d <qn | | | f S(   Nt   contourft   contouri   i    R  i   i   s&   Too many arguments to %s; see help(%s)s+   Log scale: values of z <=0 have been maskedi   i   is*   Last %s arg must give levels; see help(%s)s*   Filled contours require at least 2 levels.t   botht   mint   maxig      ?(   s   boths   min(   s   boths   max(   s   boths   min(   s   boths   max(   s   boths   min(   s   boths   max(&   R   R   R   Rk   R    R  R  R  R   R   R  R   R  R   t   masked_whereR   R   R!  R   R  R   R
   R  R   R   t   astypeR   R   R   R   t   insertR   R"  R>   t   vminR<   t   vmaxR   (	   R0   R1   t   fnt   NargsR   RI   RJ   R7   t	   level_arg(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyR   U  sd     	
.+##
#'c         C   s   |  i  i |  _ |  i d j	 ow d t |  i  } } |  i d j o
 d } n |  i d	 j o | d } n t | |  |  _ |  i	 t i
    n |  i |  _ |  i i   p |  i |  i |  i  n |  i d
 j o t |  i _ n |  i |  i  d S(   s  
        Color argument processing for contouring.

        Note that we base the color mapping on the contour levels,
        not on the actual range of the Z values.  This means we
        don't have to worry about bad values in Z, and we always have
        the full dynamic range available for the selected levels.

        The color is based on the midpoint of the layer, except for
        an extended end layers.
        i    R   R!  iR"  i   N(   s   boths   min(   s   boths   max(   s   boths   maxs   min(   R   R   R   R
   R   R   R   R   R"   t   set_normR'   R   t   scaledt   set_climR&  R'  R   t   clipt	   set_array(   R0   t   i0t   i1(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyR     s    
c         C   s   |  i  } t |  i  } | d  j o t i d f g | } n t i |  o@ t |  | j  o- t |  t	 t
 i | t |    } n< t i |  o* t |  t	 t g j o | g | } n g  } | D] } | | f q ~ } | S(   Ns   lines.linewidth(   R   R   R   R
   R   R   R-   t   iterableR   R   R    R   R   R   (   R0   R   t   NlevR   RK   t   w(    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyR     s    	#-*$c         C   s   |  i  } t |  i  } | d  j o d g | } nr t i |  o | g | } nQ t i |  o@ t |  | j  o- t |  t t	 i
 | t |    } n | S(   NR   (   R   R   R   R
   R-   RY   R2  R   R   R    R   (   R0   R   R3  R   (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyR     s    	#-c         C   s   |  i  S(   s1   For compatibility with artists, return self.alpha(   R   (   R0   (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt	   get_alpha  s    c         C   s   | |  _  |  i   d S(   s.   For compatibility with artists, set self.alphaN(   R   R   (   R0   R   (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyt	   set_alpha  s    	sM  
        contour and contourf draw contour lines and filled contours,
        respectively.  Except as noted, function signatures and return
        values are the same for both versions.

        contourf differs from the Matlab (TM) version in that it does not
            draw the polygon edges, because the contouring engine yields
            simply connected regions with branch cuts.  To draw the edges,
            add line contours with calls to contour.


        Function signatures

        contour(Z) - make a contour plot of an array Z. The level
                 values are chosen automatically.

        contour(X,Y,Z) - X,Y specify the (x,y) coordinates of the surface

        contour(Z,N) and contour(X,Y,Z,N) - contour N automatically-chosen
                 levels.

        contour(Z,V) and contour(X,Y,Z,V) - draw len(V) contour lines,
                 at the values specified in sequence V

        contourf(..., V) - fill the (len(V)-1) regions between the
                 values in V

        contour(Z, **kwargs) - Use keyword args to control colors, linewidth,
                    origin, cmap ... see below

        X, Y, and Z must be arrays with the same dimensions.
        Z may be a masked array, but filled contouring may not handle
                   internal masked regions correctly.

        C = contour(...) returns a ContourSet object.


        Optional keyword args are shown with their defaults below (you must
        use kwargs for these):

            * colors = None; or one of the following:
              - a tuple of matplotlib color args (string, float, rgb, etc),
              different levels will be plotted in different colors in the order
              specified

              -  one string color, e.g. colors = 'r' or colors = 'red', all levels
              will be plotted in this color

              - if colors == None, the colormap specified by cmap will be used

            * alpha=1.0 : the alpha blending value

            * cmap = None: a cm Colormap instance from matplotlib.cm.
              - if cmap == None and colors == None, a default Colormap is used.

            * norm = None: a matplotlib.colors.Normalize instance for
              scaling data values to colors.
              - if norm == None, and colors == None, the default
                linear scaling is used.

            * origin = None: 'upper'|'lower'|'image'|None.
              If 'image', the rc value for image.origin will be used.
              If None (default), the first value of Z will correspond
              to the lower left corner, location (0,0).
              This keyword is active only if contourf is called with
              one or two arguments, that is, without explicitly
              specifying X and Y.

            * extent = None: (x0,x1,y0,y1); also active only if X and Y
              are not specified.  If origin is not None, then extent is
              interpreted as in imshow: it gives the outer pixel boundaries.
              In this case, the position of Z[0,0] is the center of the
              pixel, not a corner.
              If origin is None, then (x0,y0) is the position of Z[0,0],
              and (x1,y1) is the position of Z[-1,-1].

            * locator = None: an instance of a ticker.Locator subclass;
              default is MaxNLocator.  It is used to determine the
              contour levels if they are not given explicitly via the
              V argument.

            * extend = 'neither', 'both', 'min', 'max'
              Unless this is 'neither' (default), contour levels are
              automatically added to one or both ends of the range so that
              all data are included.  These added ranges are then
              mapped to the special colormap values which default to
              the ends of the colormap range, but can be set via
              Colormap.set_under() and Colormap.set_over() methods.

            ****************

            contour only:
            * linewidths = None: or one of these:
              - a number - all levels will be plotted with this linewidth,
                e.g. linewidths = 0.6

              - a tuple of numbers, e.g. linewidths = (0.4, 0.8, 1.2) different
                levels will be plotted with different linewidths in the order
                specified

              - if linewidths == None, the default width in lines.linewidth in
                matplotlibrc is used

            contourf only:
            * antialiased = True (default) or False
            * nchunk = 0 (default) for no subdivision of the domain;
              specify a positive integer to divide the domain into
              subdomains of roughly nchunk by nchunk points. This may
              never actually be advantageous, so this option may be
              removed.  Chunking introduces artifacts at the chunk
              boundaries unless antialiased = False
        (   R   R   R   R   R   R  R  R  R   R   R   R   R5  R6  t   contour_doc(    (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pyR   l  s   	i		"	&		?					t(!   R   t
   __future__R    R   t
   matplotlibR   t   numpyR    t   matplotlib.numerix.npymat   numerixt   npymaR   t   matplotlib._cntrR   t   matplotlib.tickerR   t   matplotlib.transformst
   transformst   matplotlib.cmR%   t   matplotlib.colorsR   t   matplotlib.collectionsR   t   matplotlib.font_managerR   t   matplotlib.textRa   t   matplotlib.cbookR-   R   R&   R   (    (    (    s;   /Users/cmoad/workspace/matplotlib/lib/matplotlib/contour.pys   <module>   s"   
 Q