B
    Mô`ô|  ã               @   s„   d Z ddlmZ ddlZddlmZmZ ddl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 d	¡ƒZG d
d„ dƒZdS )aa  
Functions to handle markers; used by the marker functionality of
`~matplotlib.axes.Axes.plot` and `~matplotlib.axes.Axes.scatter`.

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  ``""``        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``.
============================== ====== =========================================

``None`` is the default which means 'nothing', however this table is
referred to from other docs for the valid inputs from marker inputs and in
those cases ``None`` still means 'default'.

Note that special symbols can be defined via the
:doc:`STIX math font </tutorials/text/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)

Examples showing the use of markers:

* :doc:`/gallery/lines_bars_and_markers/marker_reference`
* :doc:`/gallery/shapes_and_collections/marker_path`
* :doc:`/gallery/lines_bars_and_markers/scatter_star_poly`


.. |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
é    )ÚSizedNé   )ÚcbookÚrcParams)ÚPath)ÚIdentityTransformÚAffine2Dé   )r   é   c            R   @   s  e Zd ZdZ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#d$d%d&d&d'd(d)d*d+d,d-d.d/d0d1d2ed3ed4ed5ed6ed7e	d8e
d9ed:ed;ed<ed=ed>d?d@dAd@dBd@dCd@i)ZdDZdEZdFZdGZdêdHdI„ZdJdK„ ZdLdM„ ZdNdO„ ZdPdQ„ ZdRdS„ ZdTdU„ ZdVdW„ ZdXdY„ ZdZd[„ Zd\d]„ Zd^d_„ Z d`da„ Z!dbdc„ Z"ddde„ Z#dfdg„ Z$dhdi„ Z%djdk„ Z&dldm„ Z'dndo„ Z(dpdq„ Z)drds„ Z*dëdudv„Z+dwdx„ Z,dydz„ Z-e.d{d|gd}d}gd|d}gd{d|ggd~d�Z/e.d{d|gd€d�gd‚d�gd{d|ggd~d�Z0e.d€d�gd‚d�gd|d}gd}d}gd€d�ggd~d�Z1e.d{d|gd{d}gd}d}gd{d|ggd~d�Z2e.d{d|gd{d}gd|d}gd{d|ggd~d�Z3dƒd„„ Z4d…d†„ Z5d‡dˆ„ Z6d‰dŠ„ Z7d‹dŒ„ Z8d�dŽ„ Z9d�d�„ Z:d‘d’„ Z;d“d”„ Z<d•d–„ Z=d—d˜„ Z>d™dš„ Z?d›dœ„ Z@e.d�džgd�dtggƒZAdŸd „ ZBd¡d¢„ ZCe.d�d�gdtd�ggƒZDd£d¤„ ZEd¥d¦„ ZFe.d§d�gd§dtggƒZGd¨d©„ ZHdªd«„ ZIe.d�d�gd�džgd�d�gd¬dGgd�d�gd­dGgge.jJe.jKe.jJe.jKe.jJe.jKgƒZLd®d¯„ ZMd°d±„ ZNd²d³„ ZOd´dµ„ ZPe.džd¶gd�d�gdtd¶ggƒZQd·d¸„ ZRd¹dº„ ZSd»d¼„ ZTd½d¾„ ZUe.džd�gd�d¿gdtd{ggƒZVdÀdÁ„ ZWdÂdÃ„ ZXdÄdÅ„ ZYdÆdÇ„ ZZe.džd�gdtd�gd�džgd�dtgge.jJe.jKe.jJe.jKgƒZ[dÈdÉ„ Z\e.dždžgdtdtgdždtgdtdžgge.jJe.jKe.jJe.jKgƒZ]dÊdË„ Z^e.dÌdÍdÎdÏdÐdÑdÒdÓdÔdÕdÖd×dÌgd~d�Z_e.dØdÐdÑdÒdÓdÔdÕdÙdØg	d~d�Z`dÚdÛ„ Zae.dÜdÝdÞdßdàdádâdãdädådædçdÜgd~d�Zbe.dàdádâdãdädådædàgd~d�Zcdèdé„ ZddAS )ìÚMarkerStylea  
    A class representing marker types.

    Attributes
    ----------
    markers : list
        All known markers.
    filled_markers : list
        All known filled markers. This is a subset of *markers*.
    fillstyles : list
        The supported fillstyles.
    Ú.Zpointú,ZpixelÚoZcircleÚvZtriangle_downú^Ztriangle_upú<Ztriangle_leftú>Ztriangle_rightÚ1Ztri_downÚ2Ztri_upÚ3Ztri_leftÚ4Z	tri_rightÚ8ZoctagonÚsZsquareÚpZpentagonÚ*ZstarÚhZhexagon1ÚHZhexagon2ú+ÚplusÚxÚDZdiamondÚdZthin_diamondú|ZvlineÚ_ZhlineÚPZplus_filledÚXZx_filledZtickleftZ	tickrightZtickupZtickdownZ	caretleftZ
caretrightZcaretupZ	caretdownZcaretleftbaseZcaretrightbaseZcaretupbaseZcaretdownbaseÚNoneZnothingNú Ú )r   r   r   r   r   r   r   r   r   r   r   r    r!   r$   r%   )ÚfullÚleftÚrightÚbottomÚtopÚnone)r*   r+   r,   r-   g      à?c             C   s   d| _ |  |¡ |  |¡ dS )aX  
        Parameters
        ----------
        marker : str or array-like or None, default: None
            *None* means no marker. For other possible marker values see the
            module docstring `matplotlib.markers`.

        fillstyle : str, default: 'full'
            One of 'full', 'left', 'right', 'bottom', 'top', 'none'.
        N)Ú_marker_functionÚset_fillstyleÚ
set_marker)ÚselfÚmarkerÚ	fillstyle© r5   ú6/tmp/pip-unpacked-wheel-0c1wfn4v/matplotlib/markers.pyÚ__init__×   s    
zMarkerStyle.__init__c             C   sL   | j d krd S t| _tƒ | _d | _d | _d | _d| _d| _	d| _
|   ¡  d S )NÚroundZbuttT)r/   Ú_empty_pathÚ_pathr   Ú
_transformÚ	_alt_pathÚ_alt_transformÚ_snap_thresholdÚ
_joinstyleÚ	_capstyleÚ_filled)r2   r5   r5   r6   Ú_recacheæ   s    
zMarkerStyle._recachec             C   s   t t| jjƒƒS )N)ÚboolÚlenr:   Úvertices)r2   r5   r5   r6   Ú__bool__ó   s    zMarkerStyle.__bool__c             C   s   | j S )N)rA   )r2   r5   r5   r6   Ú	is_filledö   s    zMarkerStyle.is_filledc             C   s   | j S )N)Ú
_fillstyle)r2   r5   r5   r6   Úget_fillstyleù   s    zMarkerStyle.get_fillstylec             C   s2   |dkrt d }tj| j|d� || _|  ¡  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)r4   )r   r   Z_check_in_listÚ
fillstylesrH   rB   )r2   r4   r5   r5   r6   r0   ü   s
    
zMarkerStyle.set_fillstylec             C   s   | j S )N)r?   )r2   r5   r5   r6   Úget_joinstyle  s    zMarkerStyle.get_joinstylec             C   s   | j S )N)r@   )r2   r5   r5   r6   Úget_capstyle  s    zMarkerStyle.get_capstylec             C   s   | j S )N)Ú_marker)r2   r5   r5   r6   Ú
get_marker  s    zMarkerStyle.get_markerc          
   C   s@  t |tjƒr.|jdkr.|jd dkr.| j| _nôt |tƒrLt 	|¡rL| j
| _nÖt |tƒr`| j| _nÂt |tƒrŒt|ƒdkrŒ|d dkrŒ| j| _n–t |tjtfƒs¾|| jkr¾t| d| j|  ƒ| _ndt |tƒrØ| j |j¡ nJyt|ƒ | j| _W n4 tk
�r  } ztd |¡ƒ|‚W dd}~X Y nX t |tƒ�s<|| _|  ¡  dS )a  
        Set the marker.

        Parameters
        ----------
        marker : str or array-like or None, default: None
            *None* means no marker. For other possible marker values see the
            module docstring `matplotlib.markers`.
        r
   r   )r
   é   )r   r   r
   Z_set_zUnrecognized marker style {!r}N)Ú
isinstanceÚnpZndarrayÚndimÚshapeÚ_set_verticesr/   Ústrr   Zis_math_textÚ_set_mathtext_pathr   Ú_set_path_markerr   rD   Ú_set_tuple_markerÚlistÚmarkersÚgetattrr   Ú__dict__ÚupdateÚ
ValueErrorÚformatrM   rB   )r2   r3   Úerrr5   r5   r6   r1     s2    







zMarkerStyle.set_markerc             C   s   | 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*.
        )r:   )r2   r5   r5   r6   Úget_path;  s    zMarkerStyle.get_pathc             C   s
   | j  ¡ S )zj
        Return the transform to be applied to the `.Path` from
        `MarkerStyle.get_path()`.
        )r;   Úfrozen)r2   r5   r5   r6   Úget_transformD  s    zMarkerStyle.get_transformc             C   s   | 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*.
        )r<   )r2   r5   r5   r6   Úget_alt_pathK  s    zMarkerStyle.get_alt_pathc             C   s
   | j  ¡ S )zn
        Return the transform to be applied to the `.Path` from
        `MarkerStyle.get_alt_path()`.
        )r=   rb   )r2   r5   r5   r6   Úget_alt_transformT  s    zMarkerStyle.get_alt_transformc             C   s   | j S )N)r>   )r2   r5   r5   r6   Úget_snap_threshold[  s    zMarkerStyle.get_snap_thresholdc             C   s
   d| _ d S )NF)rA   )r2   r5   r5   r6   Ú_set_nothing^  s    zMarkerStyle._set_nothingc             C   s.   t  t  |j¡¡}tƒ  d| ¡| _|| _d S )Ng      à?)rQ   ÚmaxÚabsrE   r   Úscaler;   r:   )r2   ÚpathZrescaler5   r5   r6   Ú_set_custom_markera  s    zMarkerStyle._set_custom_markerc             C   s   |   | j¡ d S )N)rl   rM   )r2   r5   r5   r6   rW   f  s    zMarkerStyle._set_path_markerc             C   s   |   t| jƒ¡ d S )N)rl   r   rM   )r2   r5   r5   r6   rT   i  s    zMarkerStyle._set_verticesc             C   sÈ   | j }t|ƒdkr"|d d }}nt|ƒdkr@|d |d  }}|d }|dkrdt |¡| _d| _nL|dkr€t |¡| _d| _n0|dkr¢t |¡| _d| _d| _nt	d	|› �ƒ‚t
ƒ  d
¡ |¡| _d S )Nr
   r   g        rO   r   ÚmiterÚbevelFzUnexpected tuple marker: g      à?)rM   rD   r   Úunit_regular_polygonr:   r?   Úunit_regular_starZunit_regular_asteriskrA   r^   r   rj   Ú
rotate_degr;   )r2   r3   ZnumsidesZrotationZsymstyler5   r5   r6   rX   l  s$    zMarkerStyle._set_tuple_markerc       
      C   s´   ddl m} |d|  ¡ td d�}t|jƒdkr4dS |jjdd�\}}|jjdd�\}}|| }|| }t||ƒ}	tƒ  	| d|   | d|   ¡ 
d	|	 ¡| _|| _d
| _dS )za
        Draws mathtext markers '$...$' using TextPath object.

        Submitted by tcb
        r   )ÚTextPath)r   r   ztext.usetex)Zxyr   ZusetexN)Zaxisg      à?g      ð?F)Zmatplotlib.textrr   rN   r   rD   rE   Úminrh   r   Ú	translaterj   r;   r:   Z_snap)
r2   rr   ÚtextZxminZyminZxmaxZymaxÚwidthÚheightZmax_dimr5   r5   r6   rV   �  s    

 zMarkerStyle._set_mathtext_pathc             C   s   |   ¡ | jkS )N)rI   Ú_half_fillstyles)r2   r5   r5   r6   Ú
_half_fill›  s    zMarkerStyle._half_fillç      ð?c             C   s–   t ƒ  d| ¡| _tj| _|  ¡ }|  ¡ s6t 	¡ | _
n\|dkrDd}n |dkrRd}n|dkr`d}nd}t ¡  | _
| _| j |¡ | j ¡  d¡| _d S )	Ng      à?r,   g     àp@r-   g     €V@r*   g     €f@g        )r   rj   r;   rQ   Úinfr>   rI   ry   r   Zunit_circler:   Zunit_circle_righthalfr<   rq   rb   r=   )r2   Ú	reductionÚfsÚrotater5   r5   r6   Ú_set_circlež  s    zMarkerStyle._set_circlec             C   s$   t  ¡ | _tƒ  dd¡| _d | _d S )Ng9î”Öÿß¿)r   Úunit_rectangler:   r   rt   r;   r>   )r2   r5   r5   r6   Ú
_set_pixel³  s    

zMarkerStyle._set_pixelc             C   s   | j | jd� d S )N)r|   )r   Ú_point_size_reduction)r2   r5   r5   r6   Ú
_set_pointÁ  s    zMarkerStyle._set_pointr   r   éÿÿÿÿT)Úclosedg333333ã¿gš™™™™™É¿g333333ã?c             C   s  t ƒ  d¡ |¡| _d| _|  ¡ }|  ¡ s4| j| _nÊ| j	| j
| j| jg}|dkrv|d| d  | _|d| d  | _n€|dkr¤|d| d  | _|d| d  | _nR|dkrÒ|d	| d  | _|d
| d  | _n$|d
| d  | _|d	| d  | _| j| _d| _d S )Ng      à?g      @r-   r   é   r
   r,   r*   r   rO   rm   )r   rj   rq   r;   r>   rI   ry   Ú_triangle_pathr:   Ú_triangle_path_uÚ_triangle_path_lÚ_triangle_path_dÚ_triangle_path_rr<   r=   r?   )r2   ZrotÚskipr}   Zmpathsr5   r5   r6   Ú_set_triangleÎ  s,    
zMarkerStyle._set_trianglec             C   s   |   dd¡S )Ng        r   )r�   )r2   r5   r5   r6   Ú_set_triangle_upì  s    zMarkerStyle._set_triangle_upc             C   s   |   dd¡S )Ng     €f@r
   )r�   )r2   r5   r5   r6   Ú_set_triangle_downï  s    zMarkerStyle._set_triangle_downc             C   s   |   dd¡S )Ng     €V@rO   )r�   )r2   r5   r5   r6   Ú_set_triangle_leftò  s    zMarkerStyle._set_triangle_leftc             C   s   |   dd¡S )Ng     àp@r   )r�   )r2   r5   r5   r6   Ú_set_triangle_rightõ  s    zMarkerStyle._set_triangle_rightc             C   sÎ   t ƒ  dd¡| _d| _|  ¡ }|  ¡ s2t ¡ | _n’|dkr@d}n |dkrNd}n|dkr\d}nd	}t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ƒ| _	| j 
|¡ | j| _d| _d S )Ng      à¿g       @r,   g        r-   g     €f@r*   g     àp@g     €V@g      ð?g      à?rm   )r   rt   r;   r>   rI   ry   r   r€   r:   r<   rq   r=   r?   )r2   r}   r~   r5   r5   r6   Ú_set_squareø  s&    zMarkerStyle._set_squarec             C   sÈ   t ƒ  dd¡ d¡| _d| _|  ¡ }|  ¡ s8t ¡ | _	n†t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krŠd}n |dkr˜d	}n|d
kr¦d}nd}| j |¡ | j| _d| _d S )Ng      à¿é-   g      @r   r   r,   g     àp@r-   g     €V@r*   g     €f@g        rm   )r   rt   rq   r;   r>   rI   ry   r   r€   r:   r<   r=   r?   )r2   r}   r~   r5   r5   r6   Ú_set_diamond  s"    ""zMarkerStyle._set_diamondc             C   s   |   ¡  | j dd¡ d S )Ng333333ã?g      ð?)r”   r;   rj   )r2   r5   r5   r6   Ú_set_thin_diamond)  s    zMarkerStyle._set_thin_diamondc             C   sN  t ƒ  d¡| _d| _t d¡}|  ¡ }|  ¡ s8|| _�n|j	}dt
 d¡ d }t|d |d |d |d gƒ}t|d |d |d	 |d |d gƒ}t|d |d |d d| g|d gƒ}t|d |d |d	 d| g|d gƒ}|d
krú|| }	}
n6|dk�r|| }	}
n |dk�r&|| }	}
n
|| }	}
|	| _|
| _| j| _d| _d S )Ng      à?g      @é   r   g      @r   r†   r
   rO   r-   r,   r*   rm   )r   rj   r;   r>   r   ro   rI   ry   r:   rE   rQ   Úsqrtr<   r=   r?   )r2   Úpolypathr}   ÚvertsÚyr-   r,   r*   r+   ÚmpathÚ	mpath_altr5   r5   r6   Ú_set_pentagon-  s.    

 &((


zMarkerStyle._set_pentagonc       
      C   s\  t ƒ  d¡| _d| _|  ¡ }tjddd�}|  ¡ s<|| _�n|j	}tt
 |dd…d d …f |dd	…d d …f |d f¡ƒ}tt
 |d
d…d d …f |d
 f¡ƒ}tt
 |dd…d d …f |d f¡ƒ}tt
 |d |dd	…d d …f |d f¡ƒ}|dk�r|| }}	n6|dk�r|| }}	n |dk�r4|| }}	n
|| }}	|| _|	| _| j| _d| _d S )Ng      à?g      @r–   gœÅ‹…!rØ?)ZinnerCircler   r†   é   é
   rO   é   é   r-   r,   r*   rn   )r   rj   r;   r>   rI   r   rp   ry   r:   rE   rQ   Úvstackr<   r=   r?   )
r2   r}   r˜   r™   r-   r,   r*   r+   r›   rœ   r5   r5   r6   Ú	_set_starM  s,    
8&&,



zMarkerStyle._set_starc             C   s@  t ƒ  d¡| _d | _|  ¡ }t d¡}|  ¡ s8|| _� nþ|j	}t
 t
 dt
j d ¡¡}tt
 | dg|dd d …f |dgf¡ƒ}tt
 | dg|dd…d d …f |dgf¡ƒ}t|dd d …f ƒ}t|d	d d …f ƒ}|d
krì|| }	}
n6|dk�r|| }	}
n |dk�r|| }	}
n
|| }	}
|	| _|
| _| j| _d| _d S )Ng      à?r¡   r–   g      @r   )r   r   r–   r
   )r   r   r
   rO   )r   r–   r†   rO   r-   r,   r*   rm   )r   rj   r;   r>   rI   r   ro   ry   r:   rE   rQ   ri   ÚcosÚpir¢   r<   r=   r?   )r2   r}   r˜   r™   r   r-   r,   r*   r+   r›   rœ   r5   r5   r6   Ú_set_hexagon1l  s.    

*.


zMarkerStyle._set_hexagon1c             C   sF  t ƒ  d¡ d¡| _d | _|  ¡ }t d¡}|  ¡ s>|| _	� nþ|j
}t d¡d d }}t|dd d …f ƒ}t|dd d …f ƒ}tt ||g|d	d d …f | | g||gf¡ƒ}tt ||g|d
d d …f | | gf¡ƒ}	|dkrò|| }
}n6|dk�r|| }
}n |dk�r||	 }
}n
|	| }
}|
| _	|| _| j| _d| _d S )Ng      à?é   r¡   rO   r†   g      è?)r   r   r–   r†   r   )r   r
   rO   r†   )r   r   r
   )r–   r†   rO   r-   r,   r*   rm   )r   rj   rq   r;   r>   rI   r   ro   ry   r:   rE   rQ   r—   r¢   r<   r=   r?   )r2   r}   r˜   r™   r   rš   r-   r,   r*   r+   r›   rœ   r5   r5   r6   Ú_set_hexagon2Ž  s0    

,


zMarkerStyle._set_hexagon2c          	   C   sê   t ƒ  d¡| _d| _|  ¡ }t d¡}|  ¡ sB| j d¡ || _	nžt
 d¡d }tddgdd	g| d	gd|gd| g| dgddggƒ}|d
kr–d}n |dkr¤d}n|dkr²d}nd}| j |¡ | | _	| _| j ¡  d¡| _d| _d S )Ng      à?g      @r    g     €6@g       @g      @r   r„   r   r,   g     €V@r-   g     àp@r+   g     €f@g        rm   )r   rj   r;   r>   rI   r   ro   ry   rq   r:   rQ   r—   r<   rb   r=   r?   )r2   r}   r˜   r   Zhalfr~   r5   r5   r6   Ú_set_octagon±  s*    
zMarkerStyle._set_octagong        g      ð¿c             C   s&   t ƒ  d¡| _d| _d| _| j| _d S )Ng      à?g      ð?F)r   rj   r;   r>   rA   Ú_line_marker_pathr:   )r2   r5   r5   r6   Ú
_set_vlineÑ  s    zMarkerStyle._set_vlinec             C   s   |   ¡  | j d¡| _d S )NéZ   )r«   r;   rq   )r2   r5   r5   r6   Ú
_set_hline×  s    zMarkerStyle._set_hlinec             C   s(   t ƒ  dd¡| _d| _d| _| j| _d S )Ng      ð¿g      ð?F)r   rj   r;   r>   rA   Ú_tickhoriz_pathr:   )r2   r5   r5   r6   Ú_set_tickleftÝ  s    zMarkerStyle._set_tickleftc             C   s(   t ƒ  dd¡| _d| _d| _| j| _d S )Ng      ð?F)r   rj   r;   r>   rA   r®   r:   )r2   r5   r5   r6   Ú_set_tickrightã  s    zMarkerStyle._set_tickrightg       €c             C   s(   t ƒ  dd¡| _d| _d| _| j| _d S )Ng      ð?F)r   rj   r;   r>   rA   Ú_tickvert_pathr:   )r2   r5   r5   r6   Ú_set_tickupë  s    zMarkerStyle._set_tickupc             C   s(   t ƒ  dd¡| _d| _d| _| j| _d S )Ng      ð?g      ð¿F)r   rj   r;   r>   rA   r±   r:   )r2   r5   r5   r6   Ú_set_tickdownñ  s    zMarkerStyle._set_tickdowngš™™™™™é?gš™™™™™é¿c             C   s&   t ƒ  d¡| _d| _d| _| j| _d S )Ng      à?g      @F)r   rj   r;   r>   rA   Ú	_tri_pathr:   )r2   r5   r5   r6   Ú_set_tri_downþ  s    zMarkerStyle._set_tri_downc             C   s   |   ¡  | j d¡| _d S )Né´   )rµ   r;   rq   )r2   r5   r5   r6   Ú_set_tri_up  s    zMarkerStyle._set_tri_upc             C   s   |   ¡  | j d¡| _d S )Ni  )rµ   r;   rq   )r2   r5   r5   r6   Ú_set_tri_left  s    zMarkerStyle._set_tri_leftc             C   s   |   ¡  | j d¡| _d S )Nr¬   )rµ   r;   rq   )r2   r5   r5   r6   Ú_set_tri_right  s    zMarkerStyle._set_tri_rightg      ø?c             C   s,   t ƒ  d¡| _d| _d| _| j| _d| _d S )Ng      à?g      @Frm   )r   rj   r;   r>   rA   Ú_caret_pathr:   r?   )r2   r5   r5   r6   Ú_set_caretdown  s
    zMarkerStyle._set_caretdownc             C   s   |   ¡  | j d¡| _d S )Nr¶   )r»   r;   rq   )r2   r5   r5   r6   Ú_set_caretup  s    zMarkerStyle._set_caretupc             C   s   |   ¡  | j d¡| _d S )Ni  )r»   r;   rq   )r2   r5   r5   r6   Ú_set_caretleft  s    zMarkerStyle._set_caretleftc             C   s   |   ¡  | j d¡| _d S )Nr¬   )r»   r;   rq   )r2   r5   r5   r6   Ú_set_caretright!  s    zMarkerStyle._set_caretrightg      ø¿c             C   s   |   ¡  | j| _d S )N)r»   Ú_caret_path_baser:   )r2   r5   r5   r6   Ú_set_caretdownbase'  s    zMarkerStyle._set_caretdownbasec             C   s   |   ¡  | j d¡| _d S )Nr¶   )rÀ   r;   rq   )r2   r5   r5   r6   Ú_set_caretupbase+  s    zMarkerStyle._set_caretupbasec             C   s   |   ¡  | j d¡| _d S )Ni  )rÀ   r;   rq   )r2   r5   r5   r6   Ú_set_caretleftbase/  s    zMarkerStyle._set_caretleftbasec             C   s   |   ¡  | j d¡| _d S )Nr¬   )rÀ   r;   rq   )r2   r5   r5   r6   Ú_set_caretrightbase3  s    zMarkerStyle._set_caretrightbasec             C   s&   t ƒ  d¡| _d| _d| _| j| _d S )Ng      à?g      ð?F)r   rj   r;   r>   rA   Ú
_plus_pathr:   )r2   r5   r5   r6   Ú	_set_plus<  s    zMarkerStyle._set_plusc             C   s&   t ƒ  d¡| _d| _d| _| j| _d S )Ng      à?g      @F)r   rj   r;   r>   rA   Ú_x_pathr:   )r2   r5   r5   r6   Ú_set_xG  s    zMarkerStyle._set_x)gUUUUUUÕ?r   )gUUUUUUå?r   )gUUUUUUå?gUUUUUUÕ?)r   gUUUUUUÕ?)r   gUUUUUUå?)gUUUUUUå?gUUUUUUå?)gUUUUUUå?r   )gUUUUUUÕ?r   )gUUUUUUÕ?gUUUUUUå?)r   gUUUUUUå?)r   gUUUUUUÕ?)gUUUUUUÕ?gUUUUUUÕ?)r   g      à?)r   g      à?c             C   s°   t ƒ  dd¡| _d| _d| _|  ¡ }|  ¡ s6| j| _nv|dkrHd\}}n,|dkrZd\}}n|dkrld	\}}nd
\}}| j	| _| j	| _
t ƒ  dd¡| _| j |¡ | j |¡ d S )Ng      à¿g      @rm   r-   )r   r¶   r,   )r¶   r   r*   )r¬   i  )i  r¬   )r   rt   r;   r>   r?   rI   ry   Ú_plus_filled_pathr:   Ú_plus_filled_path_tr<   r=   rq   )r2   r}   r~   Ú
rotate_altr5   r5   r6   Ú_set_plus_filledU  s$    



zMarkerStyle._set_plus_filled)g      Ð?r   )g      à?g      Ð?)g      è?r   )r   g      Ð?)g      è?g      à?)r   g      è?)g      è?r   )g      à?g      è?)g      Ð?r   )r   g      è?)g      Ð?g      à?)r   g      Ð?c             C   s°   t ƒ  dd¡| _d| _d| _|  ¡ }|  ¡ s6| j| _nv|dkrHd\}}n,|dkrZd\}}n|dkrld	\}}nd
\}}| j	| _| j	| _
t ƒ  dd¡| _| j |¡ | j |¡ d S )Ng      à¿g      @rm   r-   )r   r¶   r,   )r¶   r   r*   )r¬   i  )i  r¬   )r   rt   r;   r>   r?   rI   ry   Ú_x_filled_pathr:   Ú_x_filled_path_tr<   r=   rq   )r2   r}   r~   rÊ   r5   r5   r6   Ú_set_x_filledu  s$    



zMarkerStyle._set_x_filled)NN)rz   )eÚ__name__Ú
__module__Ú__qualname__Ú__doc__ÚTICKLEFTÚ	TICKRIGHTÚTICKUPÚTICKDOWNÚ	CARETLEFTÚ
CARETRIGHTÚCARETUPÚ	CARETDOWNÚCARETLEFTBASEÚCARETRIGHTBASEÚCARETUPBASEÚCARETDOWNBASErZ   Zfilled_markersrJ   rx   r‚   r7   rB   rF   rG   rI   r0   rK   rL   rN   r1   ra   rc   rd   re   rf   rg   rl   rW   rT   rX   rV   ry   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³   ZMOVETOZLINETOr´   rµ   r·   r¸   r¹   rº   r»   r¼   r½   r¾   r¿   rÀ   rÁ   rÂ   rÃ   rÄ   rÅ   rÆ   rÇ   rÈ   rÉ   rË   rÌ   rÍ   rÎ   r5   r5   r5   r6   r   ‘   s&  
&		
$ $$ "#r   )rÒ   Úcollections.abcr   ZnumpyrQ   r(   r   r   rk   r   Z
transformsr   r   ÚrangerÓ   rÔ   rÕ   rÖ   r×   rØ   rÙ   rÚ   rÛ   rÜ   rÝ   rÞ   Úemptyr9   r   r5   r5   r5   r6   Ú<module>   s    