.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_graph.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.py: Possible Conversion ==================== Plot directed graph of possible conversion .. GENERATED FROM PYTHON SOURCE LINES 36-39 .. code-block:: Python from bioconvert.core.graph import create_graph .. GENERATED FROM PYTHON SOURCE LINES 40-42 If you use pygraphviz, you can have a good quality image using: .. GENERATED FROM PYTHON SOURCE LINES 42-46 .. code-block:: Python import matplotlib as mpl mpl.rcParams["figure.dpi"] = 250 .. GENERATED FROM PYTHON SOURCE LINES 47-53 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 53-59 .. code-block:: Python try: create_graph("conversion.png", use_singularity=True) except: create_graph("conversion.png", use_singularity=False) .. GENERATED FROM PYTHON SOURCE LINES 61-68 .. 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.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.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_graph.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_graph.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_