tidy3d icon indicating copy to clipboard operation
tidy3d copied to clipboard

Simulation.plot() doesn't resize properly when using xlim/ylim

Open xin-flex opened this issue 3 years ago • 1 comments

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

xin-flex avatar Oct 08 '22 23:10 xin-flex

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()

tylerflex avatar Oct 10 '22 08:10 tylerflex

seems like this is fixed based on the current docs? please re-open if not.

tylerflex avatar Feb 09 '23 15:02 tylerflex