kevin218 / Eureka

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

[Bug]: Using plt.tight_layout() with Ubuntu #529

Closed kevin218 closed 6 months ago

kevin218 commented 1 year ago

FAQ check

Instrument

Other (any stage)

What happened?

When using Ubuntu, there is an issue when plotting on an existing figure where the axes get progressively smaller. This might not be a Eureka! problem, but rather a matplotlib problem.

Error traceback output

/code/Eureka/src/eureka/S5_lightcurve_fitting/plots_s5.py:530: UserWarning: Tight layout not applied. tight_layout cannot make axes width small enough to accommodate all axes decorations fig.tight_layout(h_pad=0.0)

What operating system are you using?

Ubuntu

What version of Python are you running?

Python 3.8

What Python packages do you have installed?

No response

Code of Conduct

taylorbell57 commented 9 months ago

Reading through other issues online, it seems like the best way to fix this might be to use constrained_layout instead of tight_layout. E.g., https://github.com/matplotlib/matplotlib/issues/9992 and https://github.com/matplotlib/matplotlib/issues/21742