Closed cbhirsch closed 1 year ago
Hello @cbhirsch,
The rayoptics environment.py file imports a lot of stuff, including matplotlib and pyplot. Can you try moving the environment.py import after the matplotlib.uses('Qt5Agg')
statement and see if anything changes?
Thanks,
Mike Hayford
Where would I move this file too?
This is working now
Good to hear. Mike
I'm running the example:
%matplotlib widget
initialization
from rayoptics.environment import * import matplotlib matplotlib.use('Qt5Agg')
root_pth = Path(rayoptics.file).resolve().parent
app = AppManager(None) opm = app.model = OpticalModel() sm = opm['seq_model'] osp = opm['optical_spec'] pm = opm['parax_model'] em = opm['ele_model'] pt = opm['part_tree']
copying the code until: layout_plt0 = plt.figure(FigureClass=InteractiveLayout, opt_model=opm,do_draw_rays=True, do_paraxial_layout=False).plot()
The code runs but it will not display a plot I've tried this in both VScode and Juypter notebook.