
    g\                     @    d Z ddlmZ ddlmZ ddlZddlmZ dddZy)z
Internal debugging utilities, that are not expected to be used in the rest of
the codebase.

WARNING: Code in this module may change without prior notice!
    )StringIO)PathN)TransformNode)	highlightc                @   | gt               fdt               }|j                  d        | |       |j                  d       t        j                  ddt        |      j                  dd d|g|j                         j                  d	      d
       y)a  
    Generate a graphical representation of the transform tree for *transform*
    using the :program:`dot` program (which this function depends on).  The
    output format (png, dot, etc.) is determined from the suffix of *dest*.

    Parameters
    ----------
    transform : `~matplotlib.transform.Transform`
        The represented transform.
    dest : str
        Output filename.  The extension must be one of the formats supported
        by :program:`dot`, e.g. png, svg, dot, ...
        (see https://www.graphviz.org/doc/info/output.html).
    highlight : list of `~matplotlib.transform.Transform` or None
        The transforms in the tree to be drawn in bold.
        If *None*, *transform* is highlighted.
    Nc           
      z   t        |       v ry j                  t        |              i }t        |       j                  }| j                  rd| d}| v rd|d<   d|d<   d|z  |d<   d	j                  t        d
j                  |j                                     }|j                  t        |        d| d       t        |       j                         D ]d  \  }}t        |t              st        |       |j                  v s/|j                  dt        |        dt        |       d| d        ||       f y )N[]boldstyleboxshapez"%s"label z{0[0]}={0[1]}z [z];
"z" -> "z
" [label="z", fontsize=10];
)idaddtype__name___invalidjoinmapformatitemswritevars
isinstancer   _parents)	rootbufpropsr   keyvalr   recurseseens	         W/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/matplotlib/_internal_utils.pyr$   z(graphviz_dump_transform.<locals>.recurse&   s$   d8tDT
##==waLE9#E'Ng%g_33U[[]CD		RXJbt,-T
((* 	"HC#}-"T(cll2J		AbhZvbgY 7%%(E);= >S!		"    zdigraph G {
z}
dotz-T   z-ozutf-8T)inputcheck)	setr   r   
subprocessrunr   suffixgetvalueencode)	transformdestr   r    r$   r%   s     ` @@r&   graphviz_dump_transformr4      s    & K	5D"( *CIIoIsIIeNN	d4j''+T48lln##G,D:r'   )	__doc__ior   pathlibr   r-   matplotlib.transformsr   r4    r'   r&   <module>r:      s"       / ;? 1:r'   