X Tutup
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/matplotlib/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,16 @@ def __init__(
verts = self._make_verts(t, f1, f2, where)
super().__init__(verts, **kwargs)

def set_verts(self, verts, closed=True):
super().set_verts(verts, closed=closed)

# Respect global path simplification setting
simplify = bool(mpl.rcParams.get("path.simplify", True))
for path in self._paths:
path.should_simplify = simplify

set_paths = set_verts
Comment on lines +1447 to +1455
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As implemented, setting Path.should_simplify here likely won’t reduce SVG/PDF output size for fill_between: vector backends emit collection templates with simplify=False (e.g., SVG draw_path_collection and PDF writePathCollectionTemplates), so the backend never consults path.should_simplify for these polygons. If the goal is smaller vector output, the simplification flag probably needs to be plumbed into the relevant template-writing code paths (or those code paths should pass simplify=None so should_simplify is honored).

Copilot uses AI. Check for mistakes.

@staticmethod
def _f_dir_from_t(t_direction):
"""The direction that is other than `t_direction`."""
Expand Down
Loading
X Tutup