tidy3d_plot

photonforge.tidy3d_plot(obj, frequency=None, technology=None, plot_type=None, **kwargs)

Helper function to plot a component through Tidy3D.

Parameters:
  • obj (Component | Port | PortSpec) – Object to be plotted (Component, Port, or PortSpec).

  • frequency (float) – Frequency to use when creating the simulation object and ploting media. If not set, it will be automatically selected from the technology media.

  • technology (Technology) – Technology to use. If not set, use the component’s or the default technology.

  • plot_type (Literal['3d', 'eps', 'structures'] | None) – Type of plot to use. Use default plot when not set.

  • kwargs – Keyword arguments passed to the plot function.

Returns:

Matplotlib axis used for ploting.

Return type:

Any

Example

>>> technology = basic_technology()
>>> component = parametric.bend(
...     port_spec="Strip", radius=10, technology=technology
... )
>>> tidy3d_plot(component, z=0.1)

Note

This function requires the module matplotlib.pyplot.

Instances of Port and PortSpec can only be plotted with Tidy3D versions 2.7.1 and above.