EDB: plot nets with Matplotlib#

This example shows how you can use the Edb class to plot a net or a layout.

Perform required imports#

Perform required imports, which includes importing a section.

import pyedb
from pyedb.generic.general_methods import generate_unique_folder_name
from pyedb.misc.downloads import download_file

Download file#

Download the AEDT file and copy it into the temporary folder.

temp_folder = generate_unique_folder_name()

targetfolder = download_file("edb/ANSYS-HSD_V1.aedb", destination=temp_folder)

Launch EDB#

Launch the pyedb.Edb class, using EDB 2023 R2 and SI units.

edb = pyedb.Edb(edbpath=targetfolder, edbversion="2024.1")

Plot custom set of nets colored by layer#

Plot a custom set of nets colored by layer (default).

edb.nets.plot("AVCC_1V3")
main

Plot custom set of nets colored by nets#

Plot a custom set of nets colored by nets.

edb.nets.plot(["GND", "GND_DP", "AVCC_1V3"], color_by_net=True)
main

Plot all nets on a layer colored by nets#

Plot all nets on a layer colored by nets

edb.nets.plot(None, ["1_Top"], color_by_net=True, plot_components_on_top=True)
main

Plot stackup and some padstack definition#

Plot all nets on a layer colored by nets

edb.stackup.plot(scale_elevation=False, plot_definitions=["c100hn140", "c35"])
Stackup
<module 'matplotlib.pyplot' from 'C:\\actions-runner\\_work\\pyedb\\pyedb\\.venv\\lib\\site-packages\\matplotlib\\pyplot.py'>

Close EDB#

Close EDB.

edb.close_edb()
True

Total running time of the script: (0 minutes 36.203 seconds)

Gallery generated by Sphinx-Gallery