
    g                         d dl 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 d dlmZmZ d dlmZ d dlmZ d Z edgd	d
      d        Z edgd	d      d        Zd Zy)    N)image_comparison)Subplot)FloatingAxesGridHelperCurveLinear)FixedLocator)angle_helperc                  j    t        j                  d      } t        | d      }| j                  |       y )N   r   figsizeo   )pltfigurer   add_subplotfigaxs     m/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/mpl_toolkits/axisartist/tests/test_floating_axes.pytest_subplotr      s(    
**V
$C	c	BOOB    zcurvelinear3.pngdefaultr   )styletolc            	         t        j                  d      } t        j                         j	                  t
        j                  dz  d      t        j                  j                  d      z   }t        |dt        j                  d      t        g d	      t        j                         d 
      }| j                  t         |      }d}t        j                         j	                  dd|z        |z   }t        |ddd|z  d|z  ft        g d            }|j#                  d|      x|j$                  d<   }|j$                  d   j&                  j)                  d       |j$                  d   j&                  j)                  d       |j$                  d   j+                  d       |j-                  dd|d      }||j$                  d<   |j/                  dd       |j&                  j)                  d       |j&                  j+                  d       |j0                  j3                  d       |j5                  |      }g d g d!}
}	|j7                  |	|
       |j9                  |	|
d"      \  }|j;                  |j<                         y )#Nr
   r         Fapply_theta_transforms)r   h  
                     r!   extremesgrid_locator1grid_locator2tick_formatter1tick_formatter2
axes_classgrid_helperr!   r   r    r"   )   <   Z   )r*   r,   right)axesleftTest 1Test 2)r7   r5      bottomr6   axis_directionzTalllabelz = ?0.5C   r4   K   r2   r%   r   r(   r&   k-)r   r   mtransformsAffine2Dscalenppimprojections	PolarAxesPolarTransformr   r   
LocatorDMSr   FormatterDMSr   r   new_fixed_axisaxisrA   set_textset_visiblenew_floating_axistoggleline	set_colorget_aux_axesscatterplotset_clip_pathpatch)r   trr1   ax1r_scaletr2grid_helper2rT   ax2xxyyls               r   test_curvelinear3ri      s   
**V
$C



 
&
&ruus{A
6

 
 
/
/u
/
MNB'
 "--b1"#34$113K //\{/
KCG



 
&
&q!g+
6
;C(S"w,G4"<02L
  ,::7:MMCHHWHHV##H-HHW$$X.HH_))%0((AC8@ ) BDCHHSMKKDK%JJ JJ4 II


2
C|BKKB	"b$	BAOOCIIr   zcurvelinear4.pngg?c            	         dt         j                  d<   t        j                  d      } t        j                         j                  t        j                  dz  d      t        j                  j                  d      z   }t        |d	t        j                  d
      t        g d      t        j                         d       }| j!                  t"        |      }|j%                          |j&                  d   j(                  j+                  d       |j&                  d   j(                  j+                  d       |j&                  d   j-                  d       |j/                  dd|d      }||j&                  d<   |j1                  dd       |j(                  j3                  d       |j(                  j+                  d       |j(                  j-                  d       |j4                  j7                  d       |j9                  |      }g dg d}}|j;                  ||       |j=                  ||d      \  }|j?                  |j@                         y )Nr'   ztext.kerning_factorr
   r   r   r   Fr   )x   r2   r!   r   r   r$   r)   r/   r7   r8   r5   r9   topF   r;   r<   r>   Tr?   rB   rC   rD   rG   rH   )!r   rcParamsr   rI   rJ   rK   rL   rM   rN   rO   rP   r   r   rQ   r   rR   r   r   clearrT   rA   rU   rV   rW   rX   set_axis_directionrY   rZ   r[   r\   r]   r^   r_   )	r   r`   r1   ra   rT   re   rf   rg   rh   s	            r   test_curvelinear4rq   D   s    +,CLL&'
**V
$C



 
&
&ruus{A
6

 
 
/
/u
/
MNB'
!"--a0"#34$113K //\{/
KCIIKHHV##H-HHW$$X.HHUO&((BS8@ ) BDCHHSMKKDK%JJ!!%(JJ JJ4 II


2
C|BKKB	"b$	BAOOCIIr   c                      t        j                         } t        | d      }| j                  |       |j	                  ddd      |j
                  d<   |j
                  d   j                  dk(  sJ y )Nr   r   r   r7   )	nth_coordvaluer=   y)r   r   r   r   rW   rT   _axis_directionr   s     r   test_axis_directionrw   l   se    
**,C	c	BOOB''!17= ( ?BGGCL773<''6111r   )numpyrL   matplotlib.pyplotpyplotr   matplotlib.projectionsprojectionsrN   matplotlib.transforms
transformsrI   matplotlib.testing.decoratorsr   !mpl_toolkits.axisartist.axislinesr   %mpl_toolkits.axisartist.floating_axesr   r   #mpl_toolkits.axisartist.grid_finderr   mpl_toolkits.axisartistr   r   ri   rq   rw    r   r   <module>r      sr      - + : 5) < 0 %&iQ?( @(Z %&iSA$ B$N2r   