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 — setting yscale to log, after drawing a plot with values equal to zero, results in incorrect handling of zero values · Issue #8045 · matplotlib/matplotlib

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

New issue
Copy link
New issue
Copy link
Closed
Closed
setting yscale to log, after drawing a plot with values equal to zero, results in incorrect handling of zero values#8045
Copy link
Milestone
v2.1

Description

@anntzer
anntzer
opened on Feb 8, 2017
Issue body actions

mpl 1.5.3 and 2.0, py3.6

_xs = np.linspace(-50, 50, 1001); plt.semilogy(scipy.stats.norm.pdf(_xs))

results in
figure_1
where zero values (due to floating point resolution limits, at the edges) get ignored, as expected, but

_xs = np.linspace(-50, 50, 1001); plt.plot(scipy.stats.norm.pdf(_xs))
plt.gcf().canvas.draw()
plt.gca().set(yscale="log")

results in the incorrect
figure_2

Activity

  1. tacaswell
    added this to the This milestone has been deleted milestone on Feb 8, 2017
  2. jcalbert commented on Feb 10, 2017

    @jcalbert
    jcalbert
    on Feb 10, 2017
    Contributor
    More actions

    I think this boils down to lines 3241-3242 in axes/_base.py:

    if value.lower() == 'log' and 'nonposy' not in kwargs:
        kwargs['nonposy'] = 'mask'
    

    and is fixed by changing 'mask' to 'clip'.

    Working on it now.

  3. QuLogic
    modified the milestones: This milestone has been deleted, This milestone has been deleted on May 3, 2017
  4. dstansby commented on Jul 26, 2017

    @dstansby
    dstansby
    on Jul 26, 2017
    Member
    More actions

    Fixed by #8836

  5. dstansby
    closed this as completedon Jul 26, 2017
  6. QuLogic
    modified the milestones: This milestone has been deleted, This milestone has been deleted on Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      • v2.1

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.