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 a crash when saving to PDF or SVG with contour hatching. by mdboom · Pull Request #891 · matplotlib/matplotlib

Conversation

@mdboom

@mdboom mdboom commented May 23, 2012

Copy link
Copy Markdown
Member

This was found building the docs -- generating the page for contourf_hatching.py

Sorry, something went wrong.

Uh oh!

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

All reactions
@mdboom
Fix a crash when saving to PDF or SVG with contour hatching.
20a6e60
pelson
pelson reviewed May 23, 2012
View reviewed changes
Comment thread lib/matplotlib/tests/test_axes.py

@pelson pelson May 23, 2012

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Does this trigger the exception your fixing? Might be worth making this a numpy array from the off?

Sorry, something went wrong.

Uh oh!

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

All reactions

@mdboom mdboom May 23, 2012

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

What triggers the exception is having colors for the hatch that come from a collection or colormap -- in which case each rgb triple is a numpy array, not something hashable as was previously assumed by the PDF and SVG backends.

Sorry, something went wrong.

Uh oh!

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

All reactions

@mdboom mdboom May 23, 2012

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I should also note -- it doesn't make sense to convert to tuples outside of the backends because the Agg backend benefits from having the colors as a Numpy array.

Sorry, something went wrong.

Uh oh!

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

All reactions
@mdboom
Add some missing files.
d2777c5
@jkseppan

jkseppan commented May 26, 2012

Copy link
Copy Markdown
Member

Looks good to me. Would it make sense to merge this to the v1.1.x maintenance branch?

All reactions

Sorry, something went wrong.

Uh oh!

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

@efiring

efiring commented May 26, 2012

Copy link
Copy Markdown
Member

The whole thing can't be, because contourf hatching is not in v1.1.x. So maybe the thing to do is split it, merge the backend changes into v1.1.x, merge that into master, and then merge the rest of this pull request into master. Or just leave it as-is and not worry about fixing this particular bug in 1.1.x.

All reactions

Sorry, something went wrong.

Uh oh!

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

@jkseppan

jkseppan commented May 27, 2012

Copy link
Copy Markdown
Member

If there's no example where this crashes in v1.1.x, let's just merge into master.

All reactions

Sorry, something went wrong.

Uh oh!

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

jkseppan added a commit that referenced this pull request May 27, 2012
@jkseppan
Merge pull request #891 from mdboom/hatching_crash
23e335b
Fix a crash when saving to PDF or SVG with contour hatching.
@jkseppan
jkseppan merged commit 23e335b into matplotlib:master May 27, 2012
@pelson pelson mentioned this pull request Jun 9, 2012
Matplotlib does not display hatching when rendering to pdf #29
Closed
@wseviour wseviour mentioned this pull request Apr 29, 2014
contourf hatching and saving to pdf #3023
Closed
@mdboom
mdboom deleted the hatching_crash branch March 3, 2015 18:43
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

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

4 participants

@mdboom @jkseppan @efiring @pelson
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.