simonsobs / pixell

A rectangular pixel map manipulation and harmonic analysis library derived from Sigurd Naess' enlib.
Other
42 stars 32 forks source link

enplot: add background color setting #265

Open misharash opened 3 months ago

misharash commented 3 months ago

It seems enplot generates all figures with a transparent background. This (with the standard black font color) obstructs their view in dark interface mode (e.g. JupyterLab or sharing on Slack). I have not found an option to set a background color (e.g. white). As a workaround, I re-implemented show_ipython to replace transparency with white according to this StackOverflow answer. Another way around this could be setting font_color='FFFFFF', which, however, would cause issues with some light-mode viewers. A fixed background color seems like a more universal solution.