Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Description
Summary
Should Axes.grouped_bar() enforce the hatch list length to match the number of datasets,
or should it allow automatic cycling, consistent with colors and other style arguments?
If we decide that hatch should enforce length,
should other style arguments (colors, linestyles, markers, etc.)
also be updated in the future for consistency —
or should the broader design direction remain permissive and cycling-based?
Arguments for cycling (current behavior)
Consistency: Aligns with colors, linestyles, and markers, maintaining familiar user expectations.
Flexibility: Shorter lists still produce usable plots without errors.
User-friendly: Avoids unnecessary exceptions in exploratory or educational workflows.
Backward-compatible: Keeps consistent with historical behavior in most Matplotlib APIs.
Arguments for enforcing
Explicitness: Detects mistakes when users intend unique styles per dataset.
Clarity: Prevents silent repetition of hatches that could cause visual confusion.
Predictability: Ensures a clear 1:1 mapping between datasets and style definitions.
Request for feedback
Before finalizing the implementation, feedback is requested on:
Preferred default behavior (cycle vs enforce)
Whether the decision should apply only to hatches or be standardized across all style arguments
Potential implications for the public API and documentation (e.g., user expectations, legend consistency)
Proposed fix
No response