ó
±éRc           @   s÷  d  d l  m Z m Z d  d l Z d  d l m Z m Z m Z m	 Z	 m
 Z
 m Z m Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ e d k ród  d l j Z e j ƒ  Z e j ƒ  e j d ƒ Z e
 d d d d d d d d d ƒZ d8 Z e j d g d g d ƒ e e e d d9 d d d d: d e d d ƒ ƒZ e j  e ƒ d  d  l  m! Z! e d! d! d" d" d d d d# d d d$ e" ƒZ# e! d; d% ƒ Z$ e# j% j  e$ ƒ e e# d< d d= d d d d> d e d d ƒ ƒZ e j  e ƒ e j& d' ƒ j' d? ƒ Z( e) e( d d( d d d d) d d d$ e" d* d+ d, d d- d d. d d/ d d0 d d1 d+ d2 d3 d4 e* ƒZ+ e e+ d@ d dA d d d d7 d e d d ƒ ƒZ e j  e ƒ e j, d" d+ ƒ e j- d" d+ ƒ e j. ƒ  e j/ ƒ  n  d S(B   iÿÿÿÿ(   t	   Rectanglet   EllipseN(   t   AnchoredOffsetboxt   AuxTransformBoxt   VPackert   TextAreat   AnchoredTextt   DrawingAreat   AnnotationBboxt   AnchoredDrawingAreac           B   s#   e  Z d  Z d d d e d „ Z RS(   s,   
    AnchoredOffsetbox with DrawingArea
    gš™™™™™Ù?g      à?c
         K   sh   t  | | | | d t ƒ|  _ |  j |  _ t t |  ƒ j | d | d | d |  j d d d |	 |
 �d S(   s¬   
        *width*, *height*, *xdescent*, *ydescent* : the dimensions of the DrawingArea.
        *prop* : font property. This is only used for scaling the paddings.
        t   clipt   padt	   borderpadt   childt   propt   frameonN(   R   t   Truet   dat   drawing_areat   superR	   t   __init__t   None(   t   selft   widtht   heightt   xdescentt   ydescentt   locR   R   R   R   t   kwargs(    (    sb   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/anchored_artists.pyR      s    !	N(   t   __name__t
   __module__t   __doc__R   R   R   (    (    (    sb   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/anchored_artists.pyR	   
   s   t   AnchoredAuxTransformBoxc           B   s   e  Z d  d d e d „ Z RS(   gš™™™™™Ù?g      à?c         K   sG   t  | ƒ |  _ t j |  | d | d | d |  j d | d | | �d  S(   NR   R   R   R   R   (   R   R   R   R   (   R   t	   transformR   R   R   R   R   R   (    (    sb   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/anchored_artists.pyR   "   s    	N(   R   R   R   R   R   (    (    (    sb   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/anchored_artists.pyR    !   s   t   AnchoredEllipsec           B   s   e  Z d  d  d e d „ Z RS(   gš™™™™™¹?c
         K   sr   t  | ƒ |  _ t d | | | ƒ |  _ |  j j |  j ƒ t j |  | d | d | d |  j d | d |	 |
 �d S(	   s•   
        Draw an ellipse the size in data coordinate of the give axes.

        pad, borderpad in fraction of the legend font size (or prop)
        i    R   R   R   R   R   N(   i    i    (   R   t   _boxR   t   ellipset
   add_artistR   R   (   R   R!   R   R   t   angleR   R   R   R   R   R   (    (    sb   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/anchored_artists.pyR   0   s    	N(   R   R   R   R   R   (    (    (    sb   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/anchored_artists.pyR"   /   s   t   AnchoredSizeBarc           B   s    e  Z d  d  d d e d „ Z RS(   gš™™™™™¹?i   c
         K   s®   t  | ƒ |  _ |  j j t d | d d d ƒƒ t | d t ƒ|  _ t d |  j |  j g d d d d d	 | ƒ |  _ t	 j
 |  | d | d
 | d |  j d | d |	 |
 �d S(   sò   
        Draw a horizontal bar with the size in data coordinate of the give axes.
        A label will be drawn underneath (center-aligned).

        pad, borderpad in fraction of the legend font size (or prop)
        sep in points.
        i    t   fct   nonet   minimumdescentt   childrent   alignt   centerR   t   sepR   R   R   R   N(   i    i    (   R   t   size_barR%   R    R   t   Falset	   txt_labelR   R#   R   R   (   R   R!   t   sizet   labelR   R   R   R.   R   R   R   (    (    sb   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/anchored_artists.pyR   C   s    
"	N(   R   R   R   R   R   (    (    (    sb   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/anchored_artists.pyR'   B   s   t   __main__io   t   TestR   i   R   g333333Ó?R   R   g      à?t   xkt   xyboxg      ð?t   xycoordst   datat	   boxcoordss   axes fractiont
   arrowpropst
   arrowstyles   ->(   t   Circlei   i    gš™™™™™¹?R   i
   gš™™™™™Ù?id   i   gš™™™™™É?t   zoomi   t   cmapt   normt   interpolationt   origint   extentt
   filternormt	   filterradg      @t   resampleg      $Àg      $@s   offset points(   g      à?g      à?(   g      ð?g      à?(   s   axes fractions   data(   i
   i
   (   g333333Ó?gš™™™™™Ù?(   g      ð?gš™™™™™Ù?(   s   axes fractions   data(   i
   i
   (   g      à?g      à?(   g      $Àg      $@(0   t   matplotlib.patchesR    R   t   numpyt   npt   matplotlib.offsetboxR   R   R   R   R   R   R   R	   R    R"   R'   R   t   matplotlib.pyplott   pyplott   pltt   gcft   figt   clft   subplott   axR   t	   offsetboxt   xyt   plott   dictt   abR%   R=   R   t   adat   pR   t   aranget   reshapet   arrt   AnchoredImageR0   t   imt   set_xlimt   set_ylimt   drawt   show(    (    (    sb   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/anchored_artists.pyt   <module>   sn   4
		
