Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Semilog plots with zero values #3998

Closed
Closed
@raoulbq

Description

@raoulbq

Consider the following test code:

from numpy import *
from matplotlib.pyplot import *


x = arange(-10,10)
y = (1.0 - 1.0/(x**2+1))**20

figure()
semilogy(x, y, "-o")
grid(True)
savefig("test.png")

Correct Plot (the value y=0 at x=0 is masked out from y-log plot):
test_good

Wrong Plot (spurious point at x=0 with y=1e-1):
test_wrong

A git bisect tells me that:

91725d8665975de9a26d631445ab1448b0391e1a is the first bad commit
commit 91725d8665975de9a26d631445ab1448b0391e1a
Author: Joel B. Mohler <[email protected]>
Date:   Thu Aug 21 10:43:28 2014 -0400

    use _fast_from_codes_and_verts in transform code

The commit diff introduces the use of _fast_from_codes_and_verts,
so the issue is probably somewhere deeper inside this function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.status: confirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions