.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_graph_clustered.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_graph_clustered.py: Possible Conversion (clustered) ================================ Plot directed graph of possible conversions clustered by field .. GENERATED FROM PYTHON SOURCE LINES 33-36 .. code-block:: Python from bioconvert.core.graph import create_graph .. GENERATED FROM PYTHON SOURCE LINES 37-39 If you use pygraphviz, you can have a good quality image using: .. GENERATED FROM PYTHON SOURCE LINES 39-43 .. code-block:: Python import matplotlib as mpl mpl.rcParams["figure.dpi"] = 250 .. GENERATED FROM PYTHON SOURCE LINES 44-50 In order to create the following image, you need graphviz and pygraphviz. If you cannot install those packages, you may use a singularity image like in the following example by setting the use_singularity parameter to True. This would work under Linux. Not tested on other systems yet. .. GENERATED FROM PYTHON SOURCE LINES 50-56 .. code-block:: Python try: create_graph("conversion.png", use_singularity=False, include_subgraph=True) except: create_graph("conversion.png", use_singularity=True, include_subgraph=True) .. GENERATED FROM PYTHON SOURCE LINES 58-65 .. code-block:: Python from pylab import imshow, imread, xticks, yticks, gca imshow(imread("conversion.png"), interpolation="nearest") xticks([]) yticks([]) ax = gca() ax.axis("off") .. _sphx_glr_download_auto_examples_plot_graph_clustered.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_graph_clustered.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_graph_clustered.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_graph_clustered.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_