8000 Raise an error or a warning when ylim's min == 0 and yscale == "log" · Issue #7299 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Raise an error or a warning when ylim's min == 0 and yscale == "log" #7299
Closed
@NelleV

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

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

      0