.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples\00-EDB\05_Plot_nets.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_examples_00-EDB_05_Plot_nets.py: EDB: plot nets with Matplotlib ------------------------------ This example shows how you can use the ``Edb`` class to plot a net or a layout. .. GENERATED FROM PYTHON SOURCE LINES 8-11 Perform required imports ~~~~~~~~~~~~~~~~~~~~~~~~ Perform required imports, which includes importing a section. .. GENERATED FROM PYTHON SOURCE LINES 11-15 .. code-block:: default import os import pyaedt .. GENERATED FROM PYTHON SOURCE LINES 16-19 Download file ~~~~~~~~~~~~~ Download the AEDT file and copy it into the temporary folder. .. GENERATED FROM PYTHON SOURCE LINES 19-25 .. code-block:: default temp_folder = pyaedt.generate_unique_folder_name() targetfolder = pyaedt.downloads.download_file('edb/ANSYS-HSD_V1.aedb', destination=temp_folder) .. GENERATED FROM PYTHON SOURCE LINES 26-29 Launch EDB ~~~~~~~~~~ Launch the :class:`pyaedt.Edb` class, using EDB 2023 R2 and SI units. .. GENERATED FROM PYTHON SOURCE LINES 29-32 .. code-block:: default edb = pyaedt.Edb(edbpath=targetfolder, edbversion="2023.2") .. GENERATED FROM PYTHON SOURCE LINES 33-36 Plot custom set of nets colored by layer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Plot a custom set of nets colored by layer (default). .. GENERATED FROM PYTHON SOURCE LINES 36-39 .. code-block:: default edb.nets.plot("AVCC_1V3") .. image-sg:: /examples/00-EDB/images/sphx_glr_05_Plot_nets_001.png :alt: main :srcset: /examples/00-EDB/images/sphx_glr_05_Plot_nets_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 40-43 Plot custom set of nets colored by nets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Plot a custom set of nets colored by nets. .. GENERATED FROM PYTHON SOURCE LINES 43-46 .. code-block:: default edb.nets.plot(["GND", "GND_DP", "AVCC_1V3"], color_by_net=True) .. image-sg:: /examples/00-EDB/images/sphx_glr_05_Plot_nets_002.png :alt: main :srcset: /examples/00-EDB/images/sphx_glr_05_Plot_nets_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 47-50 Plot all nets on a layer colored by nets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Plot all nets on a layer colored by nets .. GENERATED FROM PYTHON SOURCE LINES 50-53 .. code-block:: default edb.nets.plot(None, ["1_Top"], color_by_net=True, plot_components_on_top=True) .. image-sg:: /examples/00-EDB/images/sphx_glr_05_Plot_nets_003.png :alt: main :srcset: /examples/00-EDB/images/sphx_glr_05_Plot_nets_003.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 54-57 Plot stackup and some padstack definition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Plot all nets on a layer colored by nets .. GENERATED FROM PYTHON SOURCE LINES 57-60 .. code-block:: default edb.stackup.plot(scale_elevation=False,plot_definitions=["c100hn140", "c35"]) .. image-sg:: /examples/00-EDB/images/sphx_glr_05_Plot_nets_004.png :alt: Stackup :srcset: /examples/00-EDB/images/sphx_glr_05_Plot_nets_004.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 61-64 Close EDB ~~~~~~~~~ Close EDB. .. GENERATED FROM PYTHON SOURCE LINES 64-66 .. code-block:: default edb.close_edb() .. rst-class:: sphx-glr-script-out .. code-block:: none True .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 15.369 seconds) .. _sphx_glr_download_examples_00-EDB_05_Plot_nets.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 05_Plot_nets.py <05_Plot_nets.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 05_Plot_nets.ipynb <05_Plot_nets.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_