GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix `Collection.draw()` single-path optimization when edgecolor/facecolor is 'none' by ayshih · Pull Request #32232 · matplotlib/matplotlib

Conversation

@ayshih

@ayshih ayshih commented Aug 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

PR summary

Fixes #17790. The immediate bug is that setting facecolor or edgecolor to "none" sets the color to an empty list, but the Collection.draw() logic to detect for single-path optimization does not consider an empty list to be a single color. That is, single-path optimization would never happen if facecolor or edgecolor is set to "none". This PR fixes that situation.

That said, this PR requires discussion because single-path optimization is newly triggered in 30+ figure tests, which means their baseline images need to be updated. This is because draw_markers() produces different output than draw_path_collection(). It's worth investigating whether single-path optimization is in fact appropriate in all cases before accepting this PR.

AI Disclosure

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • [N/A] Plotting related features are demonstrated in an example
  • [N/A] New features and API changes have release notes
  • [N/A] Documentation complies with general and docstring guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added the topic: collections and mappables label Aug 19, 2026
This was referenced Aug 19, 2026
Using facecolors='none' with a scatter plot results in off-centered symbols #17790
Open
Fixed a bug with drawing an empty Collection #32228
Merged
@ayshih
Fix single-path optimization when edgecolor/facecolor is 'none'
1d57e2b
@ayshih
ayshih force-pushed the path_optimization_color_none branch from 571623a to 1d57e2b Compare August 19, 2026 15:44
@ayshih

ayshih commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

That said, this PR requires discussion because single-path optimization is newly triggered in 30+ figure tests, which means their baseline images need to be updated. This is because draw_markers() produces different output than draw_path_collection(). It's worth investigating whether single-path optimization is in fact appropriate in all cases before accepting this PR.

  • We could reduce the number of images affected by this PR by creating a way to disable single-path optimization where it is not appropriate given the collection type.
  • We could review the (Agg) code for draw_markers() and draw_path_collection() to see if there are any bugs that are contributing to the discrepancies between the rendered output.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@QuLogic

QuLogic commented Aug 20, 2026

Copy link
Copy Markdown
Member

There's been a long standing bug with the single-path optimization #15946 Possibly #32108 may be relevant here, though I didn't test that specific case yet.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the status: needs rebase label Aug 27, 2026

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

status: needs rebase topic: collections and mappables

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Using facecolors='none' with a scatter plot results in off-centered symbols

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ayshih @QuLogic
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.