Skip to content

logitlocator misses tick at edge of axis #14743

Description

@anntzer

Bug report

Bug summary

When no data is plotted, a logit scale ignores calls to set_{x/y}lim and sticks to the default(?) of [1e-7, 1-1e-7]


edit: fixed, but see follow up at #14743 (comment).

Code for reproduction

gca().set(yscale="logit", ylim=(.9, .999))  # or (.001, .1), or etc.

Actual outcome

test

This image is made with the formatter provided by #14512 for legibility (the formatter before that PR is impossible to read), but that doesn't change the axes limits.

Expected outcome

limits respecting the set ylims.
Note that adding a call to e.g. plot(<any values>) (within or without the given limits) fixes the issue.

Matplotlib version

  • Operating system: linux
  • Matplotlib version: 3.1 or master, perhaps earlier?
  • Matplotlib backend (print(matplotlib.get_backend())): any
  • Python version: 3.7
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions