.. _sphx_glr_gallery_sprint_notes.py: GraVE Documentation ------------------- .. code-block:: python import networkx as nx toy_network = nx.barbell_graph(10, 14) node_options = { 'node_color': 'royalblue', 'node_size': 50, 'edgecolors': 'white', } edge_options = { 'line_color': 'grey', 'alpha': 0.7, } def protein_style(node_attributes): if node_attributes.get('type', '') == 'protein': return {'color': 'blue'} else: return {'color': 'red'} plot_the_graph(toy_network, layout='spring', node_style=protein_style, edge_stlye=edge_options, node_labels=None, edge_labels=None, extra_artists=None) **Total running time of the script:** ( 0 minutes 0.000 seconds) .. only :: html .. container:: sphx-glr-footer .. container:: sphx-glr-download :download:`Download Python source code: sprint_notes.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: sprint_notes.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_