o
    ˷e[                  	   @   s  d Z ddlmZ ddlZddlZddddZdd e D Z	e
 Zejd	e	d	 d
 eddD ])Zejde e	d d
 eddD ]Zejdee d ee e	d d
 qDq1ed	d ed	d ed	d eddD ]ZeddD ]Zedee dee d ee  qyqrejeddZe \ZZejeeeddddd ejjZej jZe  d e  d  d Z!e!d Z"ej#D ].Z$eee$ \Z%Z&ee%e&f\Z'Z(e)e'e" e(e" e!e!gZ*e*+ej#e$ d  e*,d qe-  dS )z
=================
Custom node icons
=================

Example of using custom icons to represent nodes with matplotlib.

Images for node icons courtesy of www.materialui.co
    Nzicons/router_black_144x144.pngzicons/switch_black_144x144.pngz icons/computer_black_144x144.png)routerswitchPCc                 C   s   i | ]\}}|t j|qS  )PILImageopen).0kfnamer   r   /var/www/ideatree/venv/lib/python3.10/site-packages/../../../share/doc/networkx-2.8.6/examples/drawing/plot_custom_node_icons.py
<dictcomp>   s    r   r   )image      switch_r   PC__r   switch_1switch_2switch_3iN'_g)seedT-   )posaxarrows
arrowstylemin_source_marginmin_target_marging?g       @r   off).__doc__matplotlib.pyplotpyplotpltnetworkxnxr   iconsitemsimagesGraphGadd_noderangeijstradd_edgeuvspring_layoutr   subplotsfigr   draw_networkx_edges	transData	transform	tr_figuretransFigureinvertedtr_axesget_xlim	icon_sizeicon_centernodesnxfyfxayaaxesaimshowaxisshowr   r   r   r   <module>   sZ    
(*
