kevin218 / Eureka

Eureka! is a data reduction and analysis pipeline intended for time-series observations with JWST.
https://eurekadocs.readthedocs.io/
MIT License
56 stars 43 forks source link

[Bug]: Matplotlib layout engine only defined if users run `eureka.lib.plots.set_rc(style='eureka')` #647

Open taylorbell57 opened 2 months ago

taylorbell57 commented 2 months ago

Without running eureka.lib.plots.set_rc(style='eureka') before running Eureka! (e.g. in the run_eureka.py file), the matplotlib layout engine is not defined which causes a crash. You should be allowed to not run that function, but we need to make sure the matplotlib layout engine is always initialized one way or another.

Originally posted by @taylorbell57 in https://github.com/kevin218/Eureka/issues/646#issuecomment-2086216180

taylorbell57 commented 1 month ago

@kevin218, can you add a bit of detail here about why the constrained layout engine wasn't working well for you?

kevin218 commented 1 month ago

I don't recall having any direct issues with Matplotlib's constrained layout engine. My issue is that I have to execute matplotlib.use('Qt5Agg') after importing Eureka! if I want to interact with any plots. For some reason, the backend is getting changed during import and the timing of this change seemed to coincide with our transition to using constrained layout.