3
$ßL]	  ã               @   sf   d dl Zd dljZd dlmZ edgd�dd„ ƒZedgd�dd	„ ƒZed
gd�dd„ ƒZ	dd„ Z
dS )é    N)Úimage_comparisonZspines_axes_positions)Zbaseline_imagesc              C   sª   t jƒ } tjddtj dƒ}dtj|ƒ }| jdddƒ}|jdƒ |j||ƒ |j	d j
dƒ |jjdƒ |j	d	 j
dƒ |jjd	ƒ |j	d jdƒ |j	d jdƒ d S )Nr   é   éd   é   zcentered spinesÚrightÚaxesçš™™™™™¹?Útopç      Ð?ÚleftÚnoneÚbottom)r   r   )r   r
   )ÚpltÚfigureÚnpZlinspaceÚpiÚsinÚadd_subplotÚ	set_titleÚplotÚspinesÚset_positionÚyaxisÚset_ticks_positionÚxaxisZ	set_color)ÚfigÚxÚyÚax© r   úD/tmp/pip-install-edjban26/matplotlib/matplotlib/tests/test_spines.pyÚtest_spines_axes_positions   s    
r!   Zspines_data_positionsc              C   sv   t jƒ } | jdddƒ}|jd jdƒ |jd jdƒ |jd jdƒ |jd jd	ƒ |jdd
gƒ |jdd
gƒ d S )Nr   r   Údatag      ø?r	   ç      à?r   r   Zzeror   ç      ø¿)r"   r$   )r"   r#   ç      à¿)r"   r%   éþÿÿÿr&   )r   r   r   r   r   Zset_xlimZset_ylim)r   r   r   r   r    Útest_spines_data_positions   s    r'   Zspines_capstylec              C   s<   t jddd� t jƒ } | jdddƒ}|jg ƒ |jg ƒ d S )Nr   é   )Z	linewidthr   )r   Úrcr   r   Z
set_xticksZ
set_yticks)r   r   r   r   r    Útest_spines_capstyle$   s
    
r*   c              C   sD  t jƒ } | jdddƒ}t jddd� |jtjdƒƒ |jjdƒ |j	d j
dƒ |j	d jd	ƒ |jd
ƒ |jjdƒ |j	d j
dƒ |j	d jd	ƒ |jdƒ |jjg ƒ |jjg ƒ t jƒ  |j	d }|jƒ j|jƒ ƒjƒ }|jjjƒ d |jk �s tdƒ‚|j	d }|jƒ j|jƒ ƒjƒ }|jjjƒ d |jk �s@tdƒ‚d S )Nr   g333333Ó?)r   r   é
   r   Úoutwardé   r   Fzy labelr   r	   zx labelr   z"Y-Axis label not left of the spinez X-Axis label not below the spine)r,   r-   )r,   r-   )r   r   r   Zsubplots_adjustr   r   Zaranger   r   r   r   Zset_visibleZ
set_ylabelr   Z
set_xlabelZ	set_ticksZdrawZget_transformZtransform_pathÚget_pathZget_extentsÚlabelÚget_positionZxminÚAssertionErrorZymin)r   r   ZspineZ	spinebboxr   r   r    Útest_label_without_ticks.   s2    



r2   )Znumpyr   Zmatplotlib.pyplotZpyplotr   Zmatplotlib.testing.decoratorsr   r!   r'   r*   r2   r   r   r   r    Ú<module>   s   

