Open
Description
by default, plotting on a plane puts the lowest transverse dimension (in 'xyz') on the x axis and the highest on the y axis.
It would be useful to be able to switch this convention with an extra kwarg transpose: bool = False
passed to Simulation.plot()
, which would flip this convention.
Sim.plot(x=0) # yz plot
Sim.plot(x=0, transpose=False) # also yz plot
Sim.plot(x=0, transpose=True) # zy plot

Notes:
- should also be applied to
Simulation.plot_eps()
- This notebook can be useful for additional testing.
- Be careful to ensure that the
hlim
andvlim
arguments are applied to the transposed dimensions.
Deliverables:
- PR into
develop
including- the front end code changes
- a test that adds a
transpose=True
in a simulation plotting, eg intests/test_components/test_simulation.py
- a line in the changelog under "added" explaining what is done.
Notes:
- We use git rebase to ensure that there's a linear history, so the feature branch ideally should be rebased against
develop
and squashed into a single commit. - For testing and formatting
- To get everything needed, from the root level of the tidy3d directory, run `pip install -e ".[dev]".
- Our code formatting and listing is done with
ruff
andblack
.black .
andruff check tidy3d
- Our tests can be run with
pytest tests
, more info here: https://github.com/flexcompute/tidy3d/blob/develop/tests/README.md
Metadata
Metadata
Assignees
Labels
No labels