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 — Addresses #8045 (set_yscale("log") inconsistent with semilogy()) by jcalbert · Pull Request #8056 · matplotlib/matplotlib

Conversation

@jcalbert

@jcalbert jcalbert commented Feb 10, 2017

Copy link
Copy Markdown
Contributor

See: #8045 "setting yscale to log, after drawing a plot with values equal to zero, results in incorrect handling of zero values "

Sorry, something went wrong.

Uh oh!

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

All reactions
@emmyzero
Fixed Axes.set_yscale and Axes.set_xscale so it has the same default
4d32261
 clipping behavior as plt.semilogy(), plt.semilogx() plt.loglog()
when handing non-positive data.
anntzer
anntzer reviewed Feb 11, 2017
View reviewed changes
Comment thread lib/matplotlib/axes/_base.py
@@ -2943,7 +2943,7 @@ def set_xscale(self, value, **kwargs):
# If the scale is being set to log, clip nonposx to prevent headaches

@anntzer anntzer Feb 11, 2017

Copy link
Copy Markdown
Contributor

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.

update the comment too? (below as well)

Sorry, something went wrong.

Uh oh!

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

All reactions
@tacaswell

tacaswell commented Feb 12, 2017

Copy link
Copy Markdown
Member

Came in via 7898bbb / #2147

The test failures look real (likely in the anti-alias of the line along the edge).

All reactions

Sorry, something went wrong.

Uh oh!

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

@jcalbert

jcalbert commented Feb 14, 2017

Copy link
Copy Markdown
Contributor Author

I spent a while hunting this down until I realized that, in fact, the before- and after- images should look different. For the moment I can't figure out how the old test conspired to make clip and mask so similar.

One possibility is the way MPL chooses the axis bounds. Shown below are four plots, the Cartesian product of (clip, mask) and data which starts at x= -2 and x=0.
mpl1

compare the above output from mpl 1.5.1 to this from mpl 2.0.0:
mpl2

is is evident that mpl1 has chosen x-axis limits that mostly obscure the difference between clip and mask.

It seems that whichever behavior we want, we will need a test that more explicitly checks the distinction.

All reactions

Sorry, something went wrong.

Uh oh!

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

@anntzer

anntzer commented Apr 16, 2017

Copy link
Copy Markdown
Contributor

Most old tests still use the classic style, where the plots use "round" numbers as limits, so that's probably why they still passed. Updating the test images should make this good.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dstansby dstansby mentioned this pull request Apr 26, 2017
Make set_yscale("log") consistent with semilogy() #8537
Closed
@dstansby dstansby mentioned this pull request Jul 3, 2017
Mask invalid values by default when setting log scale #8836
Merged
@tacaswell tacaswell mentioned this pull request Jul 11, 2017
expand log demo to a tutorial #8863
Closed
@dstansby dstansby added the status: duplicate label Jul 26, 2017
@dstansby

dstansby commented Jul 26, 2017

Copy link
Copy Markdown
Member

This ended up being superseeded by #8836, thanks for the PR though!

All reactions

Sorry, something went wrong.

Uh oh!

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

@dstansby dstansby closed this Jul 26, 2017
@jcalbert
jcalbert deleted the fix-logclip branch May 3, 2019 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@anntzer anntzer anntzer left review comments

Uh oh!

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

Assignees

No one assigned

Labels

status: duplicate

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.

5 participants

@jcalbert @tacaswell @anntzer @dstansby @emmyzero
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 01402520 — 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.