Skip to content

Raise an error or a warning when ylim's min == 0 and yscale == "log" #7299

Closed

Description

@NelleV
import matplotlib.pyplot as plt
import numpy as np

y = np.arange(3000, 112471, 10000)

fig, ax = plt.subplots()
ax.set_yscale("log")
ax.plot(y, linewidth=0, marker=".")
ax.set_ylim((0, 1e5))

yields:

figure_2

Basically, the ymin gets ignored (sometimes) when ymin == 0 and yscale == 0.

The code should raise an error or at least a warning.

version: 2.0.0b4.post2455+g063cd41

Activity

  1. added
    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    on Oct 17, 2016
  2. added a commit that references this issue on Oct 31, 2016
  3. dstansby commented on Jan 5, 2017

    @dstansby
    Member

    Looks like this is fixed now.

  4. efiring commented on Jan 6, 2017

    @efiring
    Member

    Right, it is fixed in master.

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

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions