| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Pending mixed-mode rasterization left Axes.close_group on the Agg renderer, so SVG axes groups stayed open and later axes nested inside them when artists used rasterized=True. Closes matplotlib#32174. Co-authored-by: Cursor <cursoragent@cursor.com>
| Back | FazBrowse Home | New Git URL |
PR summary
Closes #32174.
When the last artist drawn in an Axes uses rasterized=True, mixed-mode rendering can still be active when Axes.draw calls close_group('axes'). MixedModeRenderer was proxying that call to the Agg raster renderer, where close_group is a no-op. The SVG axes group therefore stayed open, so the next axes was nested inside it.
This mirrors the existing close_blend_group handling: if rasterization can be stopped (_raster_depth == 0), flush to the vector backend before closing the group. Nested close_group calls from rasterized artists still run at _raster_depth > 0, so consecutive rasterized artists can still merge into one image.
AI Disclosure
Cursor was used to help locate the mixed-mode grouping bug, implement the flush-before-close_group fix, and add the regression test. I reviewed the change and verified the issue reproduction and the fix locally.
PR quality check