
    P/Ph                         d Z ddlZddlmZ ddlZddlZddlm	Z	m
Z
 ddlmZ ddlmZmZ ddlmZmZ  ed	          \  ZZZZZZZZZZZZ e ej         d
                    Z! G d d          Z"dS )a  
Functions to handle markers; used by the marker functionality of
`~matplotlib.axes.Axes.plot`, `~matplotlib.axes.Axes.scatter`, and
`~matplotlib.axes.Axes.errorbar`.

All possible markers are defined here:

============================== ====== =========================================
marker                         symbol description
============================== ====== =========================================
``"."``                        |m00|  point
``","``                        |m01|  pixel
``"o"``                        |m02|  circle
``"v"``                        |m03|  triangle_down
``"^"``                        |m04|  triangle_up
``"<"``                        |m05|  triangle_left
``">"``                        |m06|  triangle_right
``"1"``                        |m07|  tri_down
``"2"``                        |m08|  tri_up
``"3"``                        |m09|  tri_left
``"4"``                        |m10|  tri_right
``"8"``                        |m11|  octagon
``"s"``                        |m12|  square
``"p"``                        |m13|  pentagon
``"P"``                        |m23|  plus (filled)
``"*"``                        |m14|  star
``"h"``                        |m15|  hexagon1
``"H"``                        |m16|  hexagon2
``"+"``                        |m17|  plus
``"x"``                        |m18|  x
``"X"``                        |m24|  x (filled)
``"D"``                        |m19|  diamond
``"d"``                        |m20|  thin_diamond
``"|"``                        |m21|  vline
``"_"``                        |m22|  hline
``0`` (``TICKLEFT``)           |m25|  tickleft
``1`` (``TICKRIGHT``)          |m26|  tickright
``2`` (``TICKUP``)             |m27|  tickup
``3`` (``TICKDOWN``)           |m28|  tickdown
``4`` (``CARETLEFT``)          |m29|  caretleft
``5`` (``CARETRIGHT``)         |m30|  caretright
``6`` (``CARETUP``)            |m31|  caretup
``7`` (``CARETDOWN``)          |m32|  caretdown
``8`` (``CARETLEFTBASE``)      |m33|  caretleft (centered at base)
``9`` (``CARETRIGHTBASE``)     |m34|  caretright (centered at base)
``10`` (``CARETUPBASE``)       |m35|  caretup (centered at base)
``11`` (``CARETDOWNBASE``)     |m36|  caretdown (centered at base)
``"none"`` or ``"None"``              nothing
``" "`` or  ``""``                    nothing
``"$...$"``                    |m37|  Render the string using mathtext.
                                      E.g ``"$f$"`` for marker showing the
                                      letter ``f``.
``verts``                             A list of (x, y) pairs used for Path
                                      vertices. The center of the marker is
                                      located at (0, 0) and the size is
                                      normalized, such that the created path
                                      is encapsulated inside the unit cell.
``path``                              A `~matplotlib.path.Path` instance.
``(numsides, 0, angle)``              A regular polygon with ``numsides``
                                      sides, rotated by ``angle``.
``(numsides, 1, angle)``              A star-like symbol with ``numsides``
                                      sides, rotated by ``angle``.
``(numsides, 2, angle)``              An asterisk with ``numsides`` sides,
                                      rotated by ``angle``.
============================== ====== =========================================

Note that special symbols can be defined via the
:ref:`STIX math font <mathtext>`,
e.g. ``"$\u266B$"``. For an overview over the STIX font symbols refer to the
`STIX font table <http://www.stixfonts.org/allGlyphs.html>`_.
Also see the :doc:`/gallery/text_labels_and_annotations/stix_fonts_demo`.

Integer numbers from ``0`` to ``11`` create lines and triangles. Those are
equally accessible via capitalized variables, like ``CARETDOWNBASE``.
Hence the following are equivalent::

    plt.plot([1, 2, 3], marker=11)
    plt.plot([1, 2, 3], marker=matplotlib.markers.CARETDOWNBASE)

Markers join and cap styles can be customized by creating a new instance of
MarkerStyle.
A MarkerStyle can also have a custom `~matplotlib.transforms.Transform`
allowing it to be arbitrarily rotated or offset.

Examples showing the use of markers:

* :doc:`/gallery/lines_bars_and_markers/marker_reference`
* :doc:`/gallery/lines_bars_and_markers/scatter_star_poly`
* :doc:`/gallery/lines_bars_and_markers/multivariate_marker_plot`

.. |m00| image:: /_static/markers/m00.png
.. |m01| image:: /_static/markers/m01.png
.. |m02| image:: /_static/markers/m02.png
.. |m03| image:: /_static/markers/m03.png
.. |m04| image:: /_static/markers/m04.png
.. |m05| image:: /_static/markers/m05.png
.. |m06| image:: /_static/markers/m06.png
.. |m07| image:: /_static/markers/m07.png
.. |m08| image:: /_static/markers/m08.png
.. |m09| image:: /_static/markers/m09.png
.. |m10| image:: /_static/markers/m10.png
.. |m11| image:: /_static/markers/m11.png
.. |m12| image:: /_static/markers/m12.png
.. |m13| image:: /_static/markers/m13.png
.. |m14| image:: /_static/markers/m14.png
.. |m15| image:: /_static/markers/m15.png
.. |m16| image:: /_static/markers/m16.png
.. |m17| image:: /_static/markers/m17.png
.. |m18| image:: /_static/markers/m18.png
.. |m19| image:: /_static/markers/m19.png
.. |m20| image:: /_static/markers/m20.png
.. |m21| image:: /_static/markers/m21.png
.. |m22| image:: /_static/markers/m22.png
.. |m23| image:: /_static/markers/m23.png
.. |m24| image:: /_static/markers/m24.png
.. |m25| image:: /_static/markers/m25.png
.. |m26| image:: /_static/markers/m26.png
.. |m27| image:: /_static/markers/m27.png
.. |m28| image:: /_static/markers/m28.png
.. |m29| image:: /_static/markers/m29.png
.. |m30| image:: /_static/markers/m30.png
.. |m31| image:: /_static/markers/m31.png
.. |m32| image:: /_static/markers/m32.png
.. |m33| image:: /_static/markers/m33.png
.. |m34| image:: /_static/markers/m34.png
.. |m35| image:: /_static/markers/m35.png
.. |m36| image:: /_static/markers/m36.png
.. |m37| image:: /_static/markers/m37.png
    N)Sized   )_apicbook)Path)IdentityTransformAffine2D)	JoinStyleCapStyle   )r      c                      e Zd ZdZi dddddddd	d
dddddddddddddddddddddd d!d"d#i d$d%d&d&d'd(d)d*d+d,d-d.d/d0d1d2ed3ed4ed5ed6ed7e	d8e
d9ed:ed;ed<ed=ed>d?d@dAd@dBd@dCd@iZdDZdEZdFZ	 ddHZdI ZdJ ZdK ZdL ZdM ZdN ZdO ZdP ZdQ ZdR ZdS ZdT Z dU Z!dV Z"dW Z#dX Z$dGdGdYdZZ%dd[Z&d\ Z'd] Z(d^ Z)d_ Z*d` Z+da Z,db Z-dddZ.de Z/df Z0 e1j2        dgdhgdidigdhdigg          Z3 e1j2        dgdhgdjdkgdldkgg          Z4 e1j2        djdkgdldkgdhdigdidigg          Z5 e1j2        dgdhgdgdigdidigg          Z6 e1j2        dgdhgdgdigdhdigg          Z7dm Z8dn Z9do Z:dp Z;dq Z<dr Z=ds Z>dt Z?du Z@dv ZAdw ZBdx ZCdy ZD e1dzd{gdzdcgg          ZEd| ZFd} ZG e1dzdzgdcdzgg          ZHd~ ZId ZJ e1ddzgddcgg          ZKd ZLd ZM e1dzdzgdzd{gdzdzgddgdzdzgddgge1jN        e1jO        e1jN        e1jO        e1jN        e1jO        g          ZPd ZQd ZRd ZSd ZT e1d{dgdzdzgdcdgg          ZUd ZVd ZWd ZXd ZY e1d{dzgdzdgdcdggg          ZZd Z[d Z\d Z]d Z^ e1d{dzgdcdzgdzd{gdzdcgge1jN        e1jO        e1jN        e1jO        g          Z_d Z` e1d{d{gdcdcgd{dcgdcd{gge1jN        e1jO        e1jN        e1jO        g          Zad Zb e1j2         ecjd        g d          dz            Ze e1j2         ecjd        g d          dz            Zfd Zg e1j2         ecjd        g d          dz            Zh e1j2         ecjd        g d          dz            Zid ZjdGS )MarkerStyleag  
    A class representing marker types.

    Instances are immutable. If you need to change anything, create a new
    instance.

    Attributes
    ----------
    markers : dict
        All known markers.
    filled_markers : tuple
        All known filled markers. This is a subset of *markers*.
    fillstyles : tuple
        The supported fillstyles.
    .point,pixelocirclevtriangle_down^triangle_up<triangle_left>triangle_right1tri_down2tri_up3tri_left4	tri_right8octagonssquareppentagon*starhhexagon1Hhexagon2+plusxDdiamonddthin_diamond|vline_hlinePplus_filledXx_filledtickleft	tickrighttickuptickdown	caretleft
caretrightcaretup	caretdowncaretleftbasecaretrightbasecaretupbasecaretdownbaseNonenothingnone  )r   r   r   r   r   r   r&   r(   r*   r,   r.   r0   r5   r7   r=   r?   )fullleftrightbottomtoprO   )rS   rT   rU   rV   Nc                     d| _         || _        |t          |          nd| _        |t	          |          nd| _        |                     |           |                     |           dS )a]  
        Parameters
        ----------
        marker : str, array-like, Path, MarkerStyle
            - Another instance of `MarkerStyle` copies the details of that *marker*.
            - For other possible marker values, see the module docstring
              `matplotlib.markers`.

        fillstyle : str, default: :rc:`markers.fillstyle`
            One of 'full', 'left', 'right', 'bottom', 'top', 'none'.

        transform : `~matplotlib.transforms.Transform`, optional
            Transform that will be combined with the native transform of the
            marker.

        capstyle : `.CapStyle` or %(CapStyle)s, optional
            Cap style that will override the default cap style of the marker.

        joinstyle : `.JoinStyle` or %(JoinStyle)s, optional
            Join style that will override the default join style of the marker.
        N)_marker_function_user_transformr   _user_capstyler
   _user_joinstyle_set_fillstyle_set_marker)selfmarker	fillstyle	transformcapstyle	joinstyles         R/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/matplotlib/markers.py__init__zMarkerStyle.__init__   sw    . !%(4<4Hhx000d7@7Ly333RVI&&&         c                    | j         d S t          | _        t                      | _        d | _        d | _        d | _        t          j	        | _
        | j        pt          j        | _        | j        dk    | _        |                                   d S )NrO   )rX   _empty_path_pathr   
_transform	_alt_path_alt_transform_snap_thresholdr
   round
_joinstylerZ   r   butt	_capstyle
_fillstyle_filledr^   s    rd   _recachezMarkerStyle._recache   s}     (F 
+--"##/,= &0rf   c                 N    t          t          | j        j                            S N)boollenri   verticesrt   s    rd   __bool__zMarkerStyle.__bool__
  s    C
+,,---rf   c                     | j         S rw   rs   rt   s    rd   	is_filledzMarkerStyle.is_filled  
    |rf   c                     | j         S rw   )rr   rt   s    rd   get_fillstylezMarkerStyle.get_fillstyle  s
    rf   c                 r    |t           j        d         }t          j        | j        |           || _        dS )z
        Set the fillstyle.

        Parameters
        ----------
        fillstyle : {'full', 'left', 'right', 'bottom', 'top', 'none'}
            The part of the marker surface that is colored with
            markerfacecolor.
        Nzmarkers.fillstyle)r`   )mplrcParamsr   check_in_list
fillstylesrr   )r^   r`   s     rd   r\   zMarkerStyle._set_fillstyle  s:     %89I4?i@@@@#rf   c                     | j         j        S rw   )ro   namert   s    rd   get_joinstylezMarkerStyle.get_joinstyle"  s    ##rf   c                     | j         j        S rw   )rq   r   rt   s    rd   get_capstylezMarkerStyle.get_capstyle%  s    ~""rf   c                     | j         S rw   )_markerrt   s    rd   
get_markerzMarkerStyle.get_marker(  r   rf   c                    t          |t                    r"t          j        |          r| j        | _        nbt          |t          t          f          r.|| j        v r%t          | d| j        |         z             | _        nt          |t          j
                  r)|j        dk    r|j        d         dk    r| j        | _        nt          |t                    r| j        | _        nt          |t                     r(t#          |          dv r|d         dv r| j        | _        nvt          |t&                    rt)          j        |j                  | _        nB	 t          |           | j        | _        n%# t.          $ r}t/          d|          |d}~ww xY wt          |t&                    s|| _        |                                  dS dS )a=  
        Set the marker.

        Parameters
        ----------
        marker : str, array-like, Path, MarkerStyle
            - Another instance of `MarkerStyle` copies the details of that *marker*.
            - For other possible marker values see the module docstring
              `matplotlib.markers`.
        _set_r   r   )r      )r   r   r   zUnrecognized marker style N)
isinstancestrr   is_math_text_set_mathtext_pathrX   intmarkersgetattrnpndarrayndimshape_set_verticesr   _set_path_markerr   ry   _set_tuple_markerr   copydeepcopy__dict__
ValueErrorr   ru   )r^   r_   errs      rd   r]   zMarkerStyle._set_marker+  s    fc"" 	Fu'9&'A'A 	F$($;D!!c
++ 	F$,0F0F$+D'DL<P2P$Q$QD!!,, 	F1A1AQ1$$$($6D!!%% 	F$($9D!!'' 	FCKK6,A,Aq	Y&&$($:D!!,, 	F M&/::DMMFV(,(:%% F F F ;;;= =BEFF &+.. 	!DLMMOOOOO	 	s   E5 5
F?FFc                     | j         S )z
        Return a `.Path` for the primary part of the marker.

        For unfilled markers this is the whole marker, for filled markers,
        this is the area to be drawn with *markerfacecolor*.
        )ri   rt   s    rd   get_pathzMarkerStyle.get_pathP  s     zrf   c                     | j         | j                                        S | j        | j         z                                   S )zj
        Return the transform to be applied to the `.Path` from
        `MarkerStyle.get_path()`.
        )rY   rj   frozenrt   s    rd   get_transformzMarkerStyle.get_transformY  s=    
 '?))+++Od&::BBDDDrf   c                     | j         S )z
        Return a `.Path` for the alternate part of the marker.

        For unfilled markers, this is *None*; for filled markers, this is the
        area to be drawn with *markerfacecoloralt*.
        )rk   rt   s    rd   get_alt_pathzMarkerStyle.get_alt_pathc  s     ~rf   c                     | j         | j                                        S | j        | j         z                                   S )zn
        Return the transform to be applied to the `.Path` from
        `MarkerStyle.get_alt_path()`.
        )rY   rl   r   rt   s    rd   get_alt_transformzMarkerStyle.get_alt_transforml  s?    
 '&--///'$*>>FFHHHrf   c                     | j         S rw   )rm   rt   s    rd   get_snap_thresholdzMarkerStyle.get_snap_thresholdv  s    ##rf   c                 F    | j         | j                                         S dS )z.Return user supplied part of marker transform.N)rY   r   rt   s    rd   get_user_transformzMarkerStyle.get_user_transformy  s(    +'..000 ,+rf   c                 b    t          |           }|j        |xj        |z  c_        n||_        |S )z
        Return a new version of this marker with the transform applied.

        Parameters
        ----------
        transform : `~matplotlib.transforms.Affine2D`
            Transform will be combined with current user supplied transform.
        )r   rY   )r^   ra   
new_markers      rd   transformedzMarkerStyle.transformed~  s?     !&&
%1&&)3&&&)2J&rf   )degradc                   ||t          d          ||t          d          t          |           }|j        t                      |_        ||j                            |           ||j                            |           |S )aB  
        Return a new version of this marker rotated by specified angle.

        Parameters
        ----------
        deg : float, optional
            Rotation angle in degrees.

        rad : float, optional
            Rotation angle in radians.

        .. note:: You must specify exactly one of deg or rad.
        NzOne of deg or rad is requiredz'Only one of deg and rad can be supplied)r   r   rY   r	   
rotate_degrotate)r^   r   r   r   s       rd   rotatedzMarkerStyle.rotated  s     ;3;<===?sFGGG &&
%-)1J&?&11#666?&--c222rf   c                     ||}t          |           }|j        pt                      }|                    ||          |_        |S )aW  
        Return new marker scaled by specified scale factors.

        If *sy* is not given, the same scale is applied in both the *x*- and
        *y*-directions.

        Parameters
        ----------
        sx : float
            *X*-direction scaling factor.
        sy : float, optional
            *Y*-direction scaling factor.
        )r   rY   r	   scale)r^   sxsyr   rj   s        rd   scaledzMarkerStyle.scaled  sJ     :B &&
/=8::
%/%5%5b"%=%=
"rf   c                     d| _         d S )NFr}   rt   s    rd   _set_nothingzMarkerStyle._set_nothing  s    rf   c                     t          j        t          j        |j                            }t	                                          d|z            | _        || _        d S )N      ?)r   maxabsrz   r	   r   rj   ri   )r^   pathrescales      rd   _set_custom_markerzMarkerStyle._set_custom_marker  sE    &..//"****3=99


rf   c                 :    |                      | j                   d S rw   )r   r   rt   s    rd   r   zMarkerStyle._set_path_marker  s    -----rf   c                 T    |                      t          | j                             d S rw   )r   r   r   rt   s    rd   r   zMarkerStyle._set_vertices  s&    T\ 2 233333rf   c                    | j         }t          |          dk    r|d         d}}n#t          |          dk    r|d         |d         }}|d         }|dk    r2t          j        |          | _        | j        pt          j        | _        n|dk    r2t          j	        |          | _        | j        pt          j
        | _        nQ|dk    r9t          j        |          | _        d| _        | j        pt          j
        | _        nt          d|           t                                          d                              |          | _        d S )	Nr   r           r   r   FzUnexpected tuple marker: r   )r   ry   r   unit_regular_polygonri   r[   r
   miterro   unit_regular_starbevelunit_regular_asteriskrs   r   r	   r   r   rj   )r^   r_   numsidesrotationsymstyles        rd   r   zMarkerStyle._set_tuple_marker  s'   v;;!!'ChHH[[A!'F1IhH!9q==28<<DJ"2EioDOO]]/99DJ"2EioDOO]]3H==DJ DL"2EioDOOAAABBB"****3//::8DDrf   c                    ddl m}  |d|                                 t          j        d                   }t          |j                  dk    rdS |                                }t          |j	        |j
                  }t                                          |j         d|j	         z  z   |j         d|j
         z  z                                 d|z            | _        || _        d	| _        dS )
zc
        Draw mathtext markers '$...$' using `.TextPath` object.

        Submitted by tcb
        r   )TextPath)r   r   ztext.usetex)xyr(   usetexNr         ?F)matplotlib.textr   r   r   r   ry   rz   get_extentsr   widthheightr	   	translatexminyminr   rj   ri   _snap)r^   r   textbboxmax_dims        rd   r   zMarkerStyle._set_mathtext_path  s     	-,,,,, x6T__%6%6"|M:< < <t}""F!!dj$+..JJY	zC4:+$55	zC4;,DV7VWWU3=!! 	 



rf   c                 8    |                                  | j        v S rw   )r   _half_fillstylesrt   s    rd   
_half_fillzMarkerStyle._half_fill  s    !!##t'<<<rf   r   c                    t                                          d|z            | _        t          j        | _        |                                 st          j                    | _	        d S t          j
                    x| _	        | _        |                                 }| j                            ddddd|                    | j                                                            d          | _        d S )Nr   r   Z        rT   rV   rS   rU        f@)r	   r   rj   r   infrm   r   r   unit_circleri   unit_circle_righthalfrk   r   r   r   rl   )r^   sizefss      rd   _set_circlezMarkerStyle._set_circle  s    "****3:66!v   	L)++DJJJ*.*D*F*FFDJ##%%BO&&BsCCBGI I I"&/"8"8":":"E"Ed"K"KDrf   c                 2    |                      d           d S )Nr   )r   )r   rt   s    rd   
_set_pointzMarkerStyle._set_point  s    c"""""rf   c                     t          j                    | _        t                                          dd          | _        d | _        d S )Ng9߿)r   unit_rectangleri   r	   r   rj   rm   rt   s    rd   
_set_pixelzMarkerStyle._set_pixel  s=    (**
 #**..xBB#rf   r   r   g333333gɿ333333?c                    t                                          d                              |          | _        d| _        |                                 s| j        | _        n| j        | j	        | j
        | j        g}|                                 }|dk    r'|d|z   dz           | _        |d|z   dz           | _        n|dk    r'|d|z   dz           | _        |d|z   dz           | _        nS|dk    r'|d	|z   dz           | _        |d
|z   dz           | _        n&|d
|z   dz           | _        |d	|z   dz           | _        | j        | _        | j        pt           j        | _        d S )Nr         @rV   r      r   rU   rS   r   r   )r	   r   r   rj   rm   r   _triangle_pathri   _triangle_path_u_triangle_path_l_triangle_path_d_triangle_path_rr   rk   rl   r[   r
   r   ro   )r^   rotskipmpathsr   s        rd   _set_trianglezMarkerStyle._set_triangle$  sa   "****3//::3??"   	2,DJJ++++-F
 ##%%BU{{#QXN3
!'TQ!7x#QXN3
!'TQ!7v#QXN3
!'TQ!7#QXN3
!'TQ!7"&/D.A)/rf   c                 .    |                      dd          S )Nr   r   r  rt   s    rd   _set_triangle_upzMarkerStyle._set_triangle_upB  s    !!#q)))rf   c                 .    |                      dd          S )Nr   r   r  rt   s    rd   _set_triangle_downzMarkerStyle._set_triangle_downE      !!%+++rf   c                 .    |                      dd          S )Ng     V@r   r  rt   s    rd   _set_triangle_leftzMarkerStyle._set_triangle_leftH  s    !!$***rf   c                 .    |                      dd          S )Ng     p@r   r  rt   s    rd   _set_triangle_rightzMarkerStyle._set_triangle_rightK  r  rf   c                    t                                          dd          | _        d| _        |                                 st          j                    | _        nt          ddgddgddgddgddgg          | _        t          ddgddgddgddgddgg          | _        | 	                                }dddd	d
|         }| j        
                    |           | j        | _        | j        pt          j        | _        d S )N             @r   r   r   r   r   r   r   )rU   rT   rV   rS   )r	   r   rj   rm   r   r   r   ri   rk   r   r   rl   r[   r
   r   ro   r^   r   r   s      rd   _set_squarezMarkerStyle._set_squareN  s   "**..tT::"   	2,..DJJ SzC:Sz #SzC:7 8 8DJ!C:SzC:$':Sz#; < <DN##%%B !BsCHHLFO&&v..."&/D.A)/rf   c                     t                                          dd                              d          | _        d| _        |                                 st          j                    | _        nt          ddgddgddgddgg          | _        t          ddgddgddgddgg          | _	        | 
                                }ddddd	|         }| j                            |           | j        | _        | j        pt          j        | _        d S )
Nr  -   r   r   r   r   r   r   r   )r	   r   r   rj   rm   r   r   r   ri   rk   r   rl   r[   r
   r   ro   r  s      rd   _set_diamondzMarkerStyle._set_diamond`  s   "**..tT::EEbII"   	2,..DJJ1v1v1v1v>??DJ!Aq6Aq6Aq6Aq6"BCCDN##%%B SCHHLFO&&v..."&/D.A)/rf   c                 d    |                                   | j                            dd           d S )Nr   r   )r  rj   r   rt   s    rd   _set_thin_diamondzMarkerStyle._set_thin_diamondn  s2    c3'''''rf   c                    t                                          d          | _        d| _        t	          j        d          }|                                 s|| _        n|j        }dt          j
        d          z   dz  }t	          |g d                   }t	          |g d                   }t	          |d         |d         |d	         d| g|d         g          }t	          |d         |d
         |d         d| g|d         g          }||f||f||f||fd|                                          \  | _        | _        | j        | _        | j        pt          j        | _        d S )Nr   r      r         @)r   r   r   r   )r   r   r   r   r   r   r   r   r   rV   rU   rS   rT   )r	   r   rj   rm   r   r   r   ri   rz   r   sqrtr   rk   rl   r[   r
   r   ro   )r^   polypathvertsyrV   rU   rS   rT   s           rd   _set_pentagonzMarkerStyle._set_pentagonr  sZ   "****3//",Q//   	2!DJJ%ERWQZZ2%Au\\\*++C%011Fq58U1XA2waIJJD%(E!HeAhQBqJKKEV}u* *   ""*$&DJ #'/D.A)/rf   c           	      @   t                                          d          | _        d| _        t	          j        dd          }|                                 s	|| _        n%|j        }t	          t          j
        |dd         |dd	         |dd
         g                    }t	          t          j
        |dd         |dd         g                    }t	          t          j
        |dd         |dd
         g                    }t	          t          j
        |dd
         |dd	         |dd
         g                    }||f||f||f||fd|                                          \  | _        | _        | j        | _        | j        pt          j        | _        d S )Nr   r   r  gŋ!r?)innerCircler   r      
   r   r         r  )r	   r   rj   rm   r   r   r   ri   rz   r   concatenater   rk   rl   r[   r
   r   ro   )r^   r   r!  rV   rU   rS   rT   s          rd   	_set_starzMarkerStyle._set_star  s   "****3//")!BBB   	2!DJJ%Er~uQqSz52;ac
&KLLMMC".%!*eAaCj)ABBCCFac
E!A#J'?@@AADqsU1R4[%!*(MNNOOEV}u* *   ""*$&DJ #'/D.A)/rf   c                    t                                          d          | _        d | _        t	          j        d          }|                                 s	|| _        n|j        }t          j
        t          j        dt          j        z  dz                      }t	          t          j        | dfg|g d         |dfgg                    }t	          t          j        | dfg|dd         |dfgg                    }t	          |dd                   }t	          |g d	                   }||f||f||f||fd
|                                          \  | _        | _        | j        | _        | j        pt$          j        | _        d S )Nr   r)  r  g      @r   )r   r   r  r   r   )r   r  r   r   r  )r	   r   rj   rm   r   r   r   ri   rz   r   r   cospir*  r   rk   rl   r[   r
   r   ro   )r^   r   r!  r4   rV   rU   rS   rT   s           rd   _set_hexagon1zMarkerStyle._set_hexagon1  ss   "****3//#,Q//   	2!DJJ%Erva"%i"n--..Ar~!Qy%			2BaVH&MNNOOC".QB7)U1Q3Z1a&)JKKLLFac
##D|||,--EV}u* *   ""*$&DJ #'/D.A)/rf   c           	      
   t                                          d                              d          | _        d | _        t          j        d          }|                                 s|| _        n|j	        }t          j        d          dz  d}}t          |g d                   }t          |dd	                   }t          t          j        ||fg|d d         | | f||fgg                    }t          t          j        ||fg|d	d
d         | | fgg                    }||f||f||f||fd|                                          \  | _        | _        | j        | _        | j        pt"          j        | _        d S )Nr      r)  r   r   g      ?)r   r   r  r   r   r   r  r   r   r  )r	   r   r   rj   rm   r   r   r   ri   rz   r   r  r*  r   rk   rl   r[   r
   r   ro   )	r^   r   r!  r4   r"  rV   rU   rS   rT   s	            rd   _set_hexagon2zMarkerStyle._set_hexagon2  s   "****3//::2>>#,Q//   	2!DJJ%E71::>6qAu___-..C%!*%%FQ%)rA2hA%7(9 : : ; ;DQ%!B-A2r()5 6 6 7 7E V}u* *   ""*$&DJ #'/D.A)/rf   c           
         t                                          d          | _        d| _        t	          j        d          }|                                 s"| j                            d           || _        nt          j
        d          dz  }t	          ddgdd	g| d	gd|gd| g| dgddgg          x| _        | _        |                                 }| j                            dd
ddd|                    | j                                                            d          | _        | j        pt           j        | _        d S )Nr   r   r(  g     6@r  r  r   r   r   r   r   r   )rS   rU   rT   rV   r   )r	   r   rj   rm   r   r   r   r   ri   r   r  rk   r   r   rl   r[   r
   r   ro   )r^   r   r4   r   s       rd   _set_octagonzMarkerStyle._set_octagon  sE   "****3//",Q//   	MO&&t,,,!DJJb A*.R1a&A2q'B7qbQB8aW.+/ +/ /DJ ##%%BO&&b3sCCBGI I I"&/"8"8":":"E"Ee"L"LD.A)/rf   r         c                     t                                          d          | _        d| _        d| _        | j        | _        d S Nr   r   F)r	   r   rj   rm   rs   _line_marker_pathri   rt   s    rd   
_set_vlinezMarkerStyle._set_vline  s8    "****3//"+


rf   c                 l    |                                   | j                            d          | _        d S Nr   )r9  rj   r   rt   s    rd   
_set_hlinezMarkerStyle._set_hline  s-    /44R88rf   c                     t                                          dd          | _        d| _        d| _        | j        | _        d S )Nr5  r   Fr	   r   rj   rm   rs   _tickhoriz_pathri   rt   s    rd   _set_tickleftzMarkerStyle._set_tickleft  s:    "****455")


rf   c                     t                                          dd          | _        d| _        d| _        | j        | _        d S Nr   Fr>  rt   s    rd   _set_tickrightzMarkerStyle._set_tickright  s:    "****344")


rf   g       c                     t                                          dd          | _        d| _        d| _        | j        | _        d S rB  r	   r   rj   rm   rs   _tickvert_pathri   rt   s    rd   _set_tickupzMarkerStyle._set_tickup  s:    "****344"(


rf   c                     t                                          dd          | _        d| _        d| _        | j        | _        d S )Nr   r5  FrE  rt   s    rd   _set_tickdownzMarkerStyle._set_tickdown  s:    "****355"(


rf   g?r   gc                     t                                          d          | _        d| _        d| _        | j        | _        d S )Nr   r   F)r	   r   rj   rm   rs   	_tri_pathri   rt   s    rd   _set_tri_downzMarkerStyle._set_tri_down  s7    "****3//"^


rf   c                 l    |                                   | j                            d          | _        d S Nr   rL  rj   r   rt   s    rd   _set_tri_upzMarkerStyle._set_tri_up  /    /44S99rf   c                 l    |                                   | j                            d          | _        d S Nr   rO  rt   s    rd   _set_tri_leftzMarkerStyle._set_tri_left  rQ  rf   c                 l    |                                   | j                            d          | _        d S r;  rO  rt   s    rd   _set_tri_rightzMarkerStyle._set_tri_right#  s/    /44R88rf   g      ?c                     t                                          d          | _        d| _        d| _        | j        | _        | j        pt          j	        | _
        d S Nr   g      @F)r	   r   rj   rm   rs   _caret_pathri   r[   r
   r   ro   rt   s    rd   _set_caretdownzMarkerStyle._set_caretdown)  sI    "****3//"%
.A)/rf   c                 l    |                                   | j                            d          | _        d S rN  rZ  rj   r   rt   s    rd   _set_caretupzMarkerStyle._set_caretup0  /    /44S99rf   c                 l    |                                   | j                            d          | _        d S rS  r\  rt   s    rd   _set_caretleftzMarkerStyle._set_caretleft4  r^  rf   c                 l    |                                   | j                            d          | _        d S r;  r\  rt   s    rd   _set_caretrightzMarkerStyle._set_caretright8  s/    /44R88rf   g      c                 F    |                                   | j        | _        d S rw   )rZ  _caret_path_baseri   rt   s    rd   _set_caretdownbasezMarkerStyle._set_caretdownbase>  s"    *


rf   c                 l    |                                   | j                            d          | _        d S rN  re  rj   r   rt   s    rd   _set_caretupbasezMarkerStyle._set_caretupbaseB  /    !!!/44S99rf   c                 l    |                                   | j                            d          | _        d S rS  rg  rt   s    rd   _set_caretleftbasezMarkerStyle._set_caretleftbaseF  ri  rf   c                 l    |                                   | j                            d          | _        d S r;  rg  rt   s    rd   _set_caretrightbasezMarkerStyle._set_caretrightbaseJ  s/    !!!/44R88rf   c                     t                                          d          | _        d| _        d| _        | j        | _        d S r7  )r	   r   rj   rm   rs   
_plus_pathri   rt   s    rd   	_set_pluszMarkerStyle._set_plusS  s7    "****3//"_


rf   c                     t                                          d          | _        d| _        d| _        | j        | _        d S rX  )r	   r   rj   rm   rs   _x_pathri   rt   s    rd   _set_xzMarkerStyle._set_x^  s7    "****3//"\


rf   ))r   )r   rt  )r   r   )r   r   r   r   r   r   r   r   r   r   r   r   rt  r   )rt  r   )r   r   r)  ))r   r   ru  rv  rw  rx  ry  rz  )rt  r   c                    t                      | _        d| _        | j        pt          j        | _        |                                 s| j        | _	        d S | j
        x| _	        | _        |                                 }| j                            ddddd|                    | j                                                            d          | _        d S Nr   r   r   r   r   )rV   rS   rU   rT   )r	   rj   rm   r[   r
   r   ro   r   _plus_filled_pathri   _plus_filled_path_trk   r   r   r   rl   r^   r   s     rd   _set_plus_filledzMarkerStyle._set_plus_filledk  s    "**".A)/   	K/DJJJ +/*BBDJ##%%BO&&2sCCBGI I I"&/"8"8":":"E"Ec"J"JDrf   ))r   )r   r   )r   r  )r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   )r  r   r   )r  r  r  r  r  r  r  c                    t                      | _        d| _        | j        pt          j        | _        |                                 s| j        | _	        d S | j
        x| _	        | _        |                                 }| j                            ddddd|                    | j                                                            d          | _        d S r|  )r	   rj   rm   r[   r
   r   ro   r   _x_filled_pathri   _x_filled_path_trk   r   r   r   rl   r  s     rd   _set_x_filledzMarkerStyle._set_x_filled  s    "**".A)/   	K,DJJJ +/*??DJ##%%BO&&2sCCBGI I I"&/"8"8":":"E"Ec"J"JDrf   )NNNNrw   )r   )k__name__
__module____qualname____doc__TICKLEFT	TICKRIGHTTICKUPTICKDOWN	CARETLEFT
CARETRIGHTCARETUP	CARETDOWNCARETLEFTBASECARETRIGHTBASECARETUPBASECARETDOWNBASEr   filled_markersr   r   re   ru   r{   r~   r   r\   r   r   r   r]   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   _create_closedr   r   r  r   r  r  r	  r  r  r  r  r  r  r#  r+  r/  r2  r4  r8  r9  r<  r?  r@  rC  rF  rG  rI  MOVETOLINETOrK  rL  rP  rT  rV  rY  rZ  r]  r`  rb  rd  re  rh  rk  rm  ro  rp  rr  rs  r   arrayr}  r~  r  r  r  r   rf   rd   r   r      s	         *W*W* 	X* 	_	*
 	]* 	_* 	* 	Z* 	X* 	Z* 	[* 	Y* 	X* 	Z* 	V*  	Z!*" 	Z#* *$ 	V%*& 	S'*( 	Y)** 	^+*, 	W-*. 	W/*0 	]1*2 	Z3*4 	*5*6 	;7*8 	9*: 	*;*< 	;=*> 	L?*@ 	A*B 	;C*D 	E* *F 	(]		Y
IS* *G\N DJ9 KO! ! ! !<      . . .    $ $ $$ $ $# # #  # # #J  E E E  I I I$ $ $1 1 1
    "t     :   ,    
. . .4 4 4E E E*  0= = =
L 
L 
L 
L# # #$ $ $ )T(1a&2r(QG)DEEN*t*QFT4L3++NOO*t*
T{QGb"X68 8*t*QFQGb"X+FGG*t*QFQGaW+EFFB B B<* * *, , ,+ + +, , ,B B B$B B B( ( (B B B.B B B,B B B0B B B4B B B* sDkC:677, , ,9 9 9 dS#Jc
344O* * ** * * TD#;s455N) ) )) ) ) sCj3+Cj3*Cj4+/ k4;k4;k4;01 1I$ $ $: : :: : :9 9 9 $sc3Z#s<==KB B B: : :: : :9 9 9 tdC[3+Qx@AA+ + +: : :: : :9 9 9 c{S#JT{S#J0{DK{DK12 2J
% % % dT4L3*3K#t.KK./ /G
" " " ,+HBH 6D 6D 6D -E -EGH-I J J .$-hbh 8/ 8/ 8/ /0 /023/4 5 5K K K )T( 3B 3B 3B *C *CEF*G H HN +t*828 5% 5% 5% ,& ,&(),* + +K K K K Krf   r   )#r  r   collections.abcr   numpyr   
matplotlibr   rQ   r   r   r   r   
transformsr   r	   _enumsr
   r   ranger  r  r  r  r  r  r  r  r  r  r  r  emptyrh   r   r  rf   rd   <module>r     s/  @ @B  ! ! ! ! ! !                       3 3 3 3 3 3 3 3 ' ' ' ' ' ' ' '
 ?DeBii<9fh
J]d828F##$$vK vK vK vK vK vK vK vK vK vKrf   