Skip to content

Scope raster rc defaults (partial fix for map-utils compatibility)#589

Open
cvanelteren wants to merge 2 commits intomainfrom
fix/scoped-image-interpolation
Open

Scope raster rc defaults (partial fix for map-utils compatibility)#589
cvanelteren wants to merge 2 commits intomainfrom
fix/scoped-image-interpolation

Conversation

@cvanelteren
Copy link
Collaborator

@cvanelteren cvanelteren commented Feb 17, 2026

This PR partially addresses #588 by reducing global Matplotlib rc side-effects that leak into third-party rasterized artists, notably matplotlib-map-utils ScaleBar.

Changes:

  • Stop forcing global image.interpolation to none in UltraPlot defaults.
  • Stop forcing global savefig.format to pdf in UltraPlot defaults.
  • Keep UltraPlot visual behavior by applying interpolation=none locally in UltraPlot image-producing methods (imshow, pcolorfast image branch, spy image branch), preserving user overrides.
  • Add regression tests that creating UltraPlot figures does not force global image.interpolation or savefig.format, and that UltraPlot imshow still defaults to none.

@cvanelteren cvanelteren requested a review from beckermr February 17, 2026 23:41
@cvanelteren
Copy link
Collaborator Author

See the 2 proposed fixes in #588 -- we can also force the interpolation and them fix the rasterization on their end. We are still leaking the environment which may not be wanted --> not sure how we wouldd clean up ultraplot if matplotlib is imported, i.e. we are permanently changing the RC for them too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant