tidy3d
tidy3d copied to clipboard
Simulation.plot() doesn't resize properly when using xlim/ylim
Describe the bug When setting xlim/ylim in Simulation.plot() or .plot_grid() (possibly other plotting functions), the figure size becomes very small, it seems like the figure is not resized to properly occupy the whole figure size.
To Reproduce See this example cell [4] (plot function is in cell [3]).
Expected behavior Plot will resize to occupy the whole figure size
I looked into this a bit this morning. I couldn't figure out how to fix it but in the interest of time, I might need to leave until this until we refactor out the plotting bits from the core components for 2.0.
In general, it seems the ax.set_xmin(...) functions are not working well with the plt.subplots() axes when simulations are added to them. I tested many different things and nothing could help. A similar issue occurred in the VizSimulation notebook when I messed around with adding xlims and ylims. Seems to be unrelated to .plot_grid()
seems like this is fixed based on the current docs? please re-open if not.