Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/test_components/test_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ def test_sim_plot_structures_fill():

def test_tidy3d_matplotlib_style_application_on_import():
"""Test restore_matplotlib_rcparams() to reset the automatically applied matplotlib.rcParams"""
assert mpl.rcParams.get("axes.edgecolor") == "#ECEBEA"
assert mpl.rcParams.get("axes.prop_cycle").by_key()["color"][0] == "#176737"
restore_matplotlib_rcparams()
assert mpl.rcParams.get("axes.edgecolor") == mpl.rcParamsDefault.get("axes.edgecolor")
assert (
mpl.rcParams.get("axes.prop_cycle").by_key()["color"][0]
== mpl.rcParamsDefault.get("axes.prop_cycle").by_key()["color"][0]
)
3 changes: 0 additions & 3 deletions tidy3d/style.mplstyle
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
axes.prop_cycle : cycler(color=["#176737", "#FF7B0D", "#979BAA", "#F44E6A", "#0062FF", "#26AB5B", "#6D3EF2", "#F59E0B"])
axes.grid : True
grid.linestyle : :
axes.edgecolor : "#ECEBEA"
Loading