Draw the graph G using hvPlot. Draw the graph with hvPlot with options for node positions, labeling, titles, and many other drawing features. Parameters ---------- G : graph A networkx graph pos : dictionary, optional A dictionary with nodes as keys and p
(G, pos=None, **kwargs)
| 120 | |
| 121 | |
| 122 | def draw(G, pos=None, **kwargs): |
| 123 | """ |
| 124 | Draw the graph G using hvPlot. |
| 125 | |
| 126 | Draw the graph with hvPlot with options for node positions, |
| 127 | labeling, titles, and many other drawing features. |
| 128 | |
| 129 | Parameters |
| 130 | ---------- |
| 131 | G : graph |
| 132 | A networkx graph |
| 133 | pos : dictionary, optional |
| 134 | A dictionary with nodes as keys and positions as values. |
| 135 | If not specified a spring layout positioning will be computed. |
| 136 | See :py:mod:`networkx.drawing.layout` for functions that |
| 137 | compute node positions. |
| 138 | arrows : bool, optional (default=True) |
| 139 | For directed graphs, if True draw arrowheads. |
| 140 | Note: Arrows will be the same color as edges. |
| 141 | arrowhead_length : float, optional (default=0.025) |
| 142 | The length of the arrows as fraction of the overall extent of |
| 143 | the graph |
| 144 | with_labels : bool, optional (default=True) |
| 145 | Set to True to draw labels on the nodes. |
| 146 | nodelist : list, optional (default G.nodes()) |
| 147 | Draw only specified nodes |
| 148 | edgelist : list, optional (default=G.edges()) |
| 149 | Draw only specified edges |
| 150 | node_size : scalar or array, optional (default=300) |
| 151 | Size of nodes. If an array is specified it must be the |
| 152 | same length as nodelist. |
| 153 | node_color : color string, node attribute, or array of floats, (default='r') |
| 154 | Can be a single color, the name of an attribute on the nodes or |
| 155 | sequence of colors with the same length as nodelist. If the |
| 156 | node_color references an attribute on the nodes or is a list of |
| 157 | values they will be colormapped using the cmap and vmin, vmax |
| 158 | parameters. |
| 159 | node_shape : string, optional (default='o') |
| 160 | The shape of the node. Specification is as valid bokeh marker. |
| 161 | alpha : float, optional (default=1.0) |
| 162 | The node and edge transparency |
| 163 | cmap : Colormap, optional (default=None) |
| 164 | Colormap for mapping intensities of nodes |
| 165 | vmin,vmax : float, optional (default=None) |
| 166 | Minimum and maximum for node colormap scaling |
| 167 | linewidths : [None | scalar | sequence] |
| 168 | Line width of symbol border (default =1.0) |
| 169 | edge_width : float, optional (default=1.0) |
| 170 | Line width of edges |
| 171 | edge_color : color string, or array of floats (default='r') |
| 172 | Can be a single color, the name of an attribute on the edges or |
| 173 | sequence of colors with the same length as the edges. If the |
| 174 | edge_color references an attribute on the edges or is a list of |
| 175 | values they will be colormapped using the edge_cmap and |
| 176 | edge_vmin, edge_vmax parameters. |
| 177 | edge_cmap : Matplotlib colormap, optional (default=None) |
| 178 | Colormap for mapping intensities of edges |
| 179 | edge_vmin,edge_vmax : floats, optional (default=None) |
no test coverage detected
searching dependent graphs…