+
    f7iF  c                   s   R t ^ RIHtHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIt^ RIt^ RIt]P                  ! ]4      tRR ltR tRR	 ltR
 tR tR tR tR tR tRR lt]R8X  d   ^ RIt]P8                  ! ]! 4       4       R# R# )z;Visualize DesignSpaceDocument and resulting VariationModel.)VariationModelsupportScalar)DesignSpaceDocument)pyplot)axes3d)cycleNc                 s   V w  r#p\        V4       Uu. uF  qRW2,
          V,          V,          ,           NK!  	  up\        V4       Uu. uF  qSWC,
          V,          V,          ,           NK!  	  up,           V.,           # u upi u upi N)range)supportZcountZaZbcis   &&    </usr/lib64/python3.14/site-packages/fontTools/varLib/plot.pystopsr      su    GA! +0,7,Qaeq[5 	 	 ,7,1%L
9Lq{U"""L
9	:#	7
9s   %A=%Bc                 s   \        V \        \        P                  P                  P
                  4      4       F  w  rE\        V4      ^8X  d3   VP                  ! VP                  V^ ,          ^ 4      .R.R3RV/VB  KG  \        V4      ^8X  dL   VP                  ! VP                  V^ ,          ^ 4      .VP                  V^,          ^ 4      .R.R3RV/VB  K  \        \        V4      4      h	  R# )         ?ZocolorN)
zipr   r   cmSet1colorslenplotgetZAssertionError)	locationsaxessubplotkwargslocr   s   &&&,  r   _plotLocationsDotsr      s    )U699>>+@+@%AB
t9>LL#''$q'1-.sR%R6RY!^LLa!$%a!$%	
   !T++ C    c                 s8   \        V 4      p\        P                  ! VR ,          4      p\        P                  ! WE,          4      pVf   R.\        V 4      ,          p\        V 4      p\	        \        V4      4       Uu. uF  qVP
                  V,          ,          NK  	  pp\        V ^ ,          P                  4       4      p	\        V	4      ^8X  d   \        Wy^ ,          WV3RV/VB  R# \        V	4      ^8X  d   \        WyWV3RV/VB  R# \        R4      hu upi )g      ?NnamesOnly 1 or 2 axes are supported)r   mathZceilr    r   ZreverseMappingZsortedZkeys_plotLocations2D_plotLocations3D
ValueError)
r   figr   r   Zncolsrowsmodelr
   r   s
   &&&,      r   plotLocationsr(   *   s    IA99QVD99QXD}Y'9%E5:3u:5FG5F5''*++5FEG)A,##%&D
4yA~QDPPP	TacMUMfM9:: Hs   ="Dc           	      sj   VP                  ^o4      p\        \        V P                  \	        \
        P                  P                  P                  4      \	        V4      4      4       F  w  pw  rpVe   VP                  V4       VP                  V4       \
        P                  ! RR4       V	P                  VR4      p. . r\        V4       F2  p\        W/V	4      pVP                  V4       VP                  V4       K4  	  VP                   ! W3RV
/VB  \#        V P$                  V.V4       K  	  R# )o   Nr   r         r*   g        r   )add_subplot	enumerater   supportsr   r   r   r   r   	set_title
set_xlabelxlimr   r   r   appendr   r   r   )r'   axisr$   r%   r&   r   r   r   r
   r   r   nameXsXYxys   &&&&&&,          r   r!   r!   >   s    ooc"G%.ENNE&)).."7"78%,G&!!GD d#4 D$[[0121rAti1AHHQKHHQK  	Q11&15??TFG<!&r   c           	      s(   Vw  rxVP                  ^oRR7      p	\        \        V P                  \	        \
        P                  P                  P                  4      \	        V4      4      4       EF  w  p
w  rpVe   V	P                  V4       V	P                  V4       V	P                  V4       \
        P                  ! RR4       \
        P                  ! RR4       VP                  VR4      pVP                  VR4      p\        V4       Fl  p. . . pppV FF  p\!        VVVV/V4      pVP#                  V4       VP#                  V4       VP#                  V4       KH  	  V	P$                  ! VVV3RV/VB  Kn  	  \        V4       Fl  p. . . pppV FF  p\!        VVVV/V4      pVP#                  V4       VP#                  V4       VP#                  V4       KH  	  V	P$                  ! VVV3RV/VB  Kn  	  \'        V P(                  Wx.V	4       EK  	  R# )r)   3dZ
projectionNr   r   r*   r+   )r,   r-   r   r.   r   r   r   r   r   r/   r0   Z
set_ylabelr1   Zylimr   r   r   r2   r   r   r   )r'   r   r$   r&   r%   r   r   Zax1Zax2axis3Dr
   r   r   r4   r5   ZYsr8   r6   r7   Zr9   Zzs   &&&&&&,               r   r"   r"   S   s   HC__ST_2F%.ENNE&)).."7"78%,G&!!GD T"##D$D$[[/0[[/0rA"b!qA!33"2G<	 
 KK1a7u77  rA"b!qA!33"2G<	 
 KK1a7u77  	5??SJ?;&r   c                 s    V P                  4        V P                   Uu. uF  q3P                  NK  	  ppV P                   Uu. uF  q3P                  NK  	  pp\	        WAV3/ VB  R # u upi u upi r   )Z	normalizeZsourcesZlocationr4   r(   )docr$   r   sr   r   s   &&,   r   plotDocumentr@   w   sV    MMO%([[1[[I1 [[)[VV[E))%262 2)s   A(A-c                 s  a \        V P                  4      ^8X  g   Q hV P                  ^ ,          o\        V3R lV P                   4       4      p\	        V3R lV P                   4       4      p^ RIpVP                  WEWT,
          ^d,          4      p. pV F)  p	SV	/p
V P                  W4      pVP                  V4       K+  	  VP                  ^o4      pVP                  ! WxR3/ VB  R# )r   c              3   F   <"   T F  qP                  S^ 4      x  K  	  R# 5i    Nr   .0r   r3      & r   	<genexpr>*_plotModelFromMasters2D.<locals>.<genexpr>        ?774##   !c              3   rA   rB   rD   rE   rG   r   rH   rI      rJ   rK   NZ-)r   	axisOrderminr   maxnumpyarangeinterpolateFromMastersr2   r,   r   )r'   masterValuesr$   r   Zaxis_minZaxis_maxnpr6   r7   r8   r   vr   r3   s   &&&,         @r   _plotModelFromMasters2DrU   ~   s    u1$$$??1D?u??H?u??H
		(x':c&ABA
AQi((;	 
 ooc"GLLs%f%r   c                 sp  aa \        V P                  4      ^8X  g   Q hV P                  ^ ,          V P                  ^,          uoo\        V3R lV P                   4       4      p\	        V3R lV P                   4       4      p\        V3R lV P                   4       4      p\	        V3R lV P                   4       4      p^ RIpVP                  WEWT,
          ^d,          4      p	VP                  WgWv,
          ^d,          4      p
VP                  W4      w  r. p\        W4       FV  w  r. pVP                  V4       \        W4       F/  w  ppSVSV/pV P                  VV4      pVP                  V4       K1  	  KX  	  VP                  V4      pVP                  ^oRR7      pVP                  ! WV3/ VB  R# )i   c              3   rA   rB   rD   rF   r   axis1rG   r   rH   *_plotModelFromMasters3D.<locals>.<genexpr>        A#GGE1%%rK   c              3   rA   rB   rD   rV   rG   r   rH   rX      rY   rK   c              3   rA   rB   rD   rF   r   axis2rG   r   rH   rX      rY   rK   c              3   rA   rB   rD   rZ   rG   r   rH   rX      rY   rK   Nr:   r;   )r   rL   rM   r   rN   rO   rP   Zmeshgridr   r2   rQ   Zarrayr,   Zplot_surface)r'   rR   r$   r   Z	axis1_minZ	axis1_maxZ	axis2_minZ	axis2_maxrS   r6   r7   r=   Zrow_xZrow_yZz_rowr8   r9   r   rT   r<   rW   r[   s   &&&,                @@r   _plotModelFromMasters3Dr\      sc   u1$$$??1%uq'9LE5AAAIAAAIAAAIAAAI
		))>#(EFA
		))>#(EFA;;qDA
AA		%DAq!UA&C,,S,?ALLO & " 	A__ST_2F
a*6*r   c                s    \        V P                  4      ^8X  d   \        WV3/ VB  R# \        V P                  4      ^8X  d   \        WV3/ VB  R# \	        R4      h)zPlot a variation model and set of master values corresponding
to the locations to the model into a pyplot figure.  Variation
model must have axisOrder of size 1 or 2.r   N)r   rL   rU   r\   r#   )r'   rR   r$   r   s   &&&,r   plotModelFromMastersr]      sP     5??q SCFC	U__		"SCFC9::r   c                 s   ^ RI Hp V f   \        P                  R,          p V! 4        \	        V 4      ^8  d~   \        R\        P                  R7       \        R4       \        R\        P                  R7       \        R4       \        R\        P                  R7       \        P                  ! ^4       \        P                  ! 4       pVP                  R	4       \	        V 4      ^8X  dN   V ^ ,          P                  R
4      '       d0   \        4       pVP                  V ^ ,          4       \        W24       EM/\        \!        R4      \!        R4      ^,           4       Uu. uF  p\#        V4      NK  	  ppRV ^ ,          9  dG   V  Uu. uF.  p\%        \'        VR VP)                  R4       4       4      4      NK0  	  pp\+        Wr4       M. p. p	V  Fj  p
V
P)                  R4      w  rVP-                  \%        \'        VR VP)                  R4       4       4      4      4       V	P-                  \/        V4      4       Kl  	  \1        WR\	        V^ ,          4       4      p\3        WV4       \        P4                  ! 4        R# u upi u upi )rC   )configLoggerN:r   NNz/usage: fonttools varLib.plot source.designspace)Zfilez  orz4usage: fonttools varLib.plot location1 location2 ...zBusage: fonttools varLib.plot location1=value1 location2=value2 ...Tz.designspaceZAr=   Z=c              3   8   "   T F  p\        V4      x  K  	  R # 5ir   floatrF   rT      & r   rH   main.<locals>.<genexpr>   s     #ClE!HHl   Z,c              3   r_   r   r`   rb   rc   r   rH   rd      s     0R>aq>re   )Z	fontToolsr^   sysZargvr   ZprintZstderrexitr   ZfigureZset_tight_layoutZendswithr   Zreadr@   r   ZordZchrZdictr   Zsplitr(   r2   ra   r    r]   Zshow)Zargsr^   r$   r>   r	   r   r?   Zlocsr   rR   Zargr   rT   r'   s   &             r   mainrh      s   &|xx| N 4y1}?cjjQfD3::VfP	
 	
--/C
4yA~$q'**>::!#aS %c#hC1 => =1A =>d1gOSTt!DT#Caggcl#CDEtDT$$IL3  c$0R399S>0R&S!TU##E!H-  #93FS15F.GHE c:
KKM ?Ts    I?4JZ__main__)i
   r   )Z__doc__ZfontTools.varLib.modelsr    r   ZfontTools.designspaceLibr   Z
matplotlibr   Zmpl_toolkits.mplot3dr   Z	itertoolsr   r    Zloggingrf   Z	getLoggerZ__name__Zlogr   r   r(   r!   r"   r@   rU   r\   r]   rh   rg   ) r   r   <module>ri      s    A A 8  '    
!,";(=*!@H3&*+:	;,^ zHHTV r   