-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Cleanup API for setting ticks #15005
Copy link
Copy link
Closed
Labels
API: changesChanges to the public API, typically requiring deprecation.Changes to the public API, typically requiring deprecation.API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …Consistency of the matplotlib API, including naming, behavior, defaults, …
Milestone
Metadata
Metadata
Assignees
Labels
API: changesChanges to the public API, typically requiring deprecation.Changes to the public API, typically requiring deprecation.API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …Consistency of the matplotlib API, including naming, behavior, defaults, …
Type
Fields
Give feedbackNo fields configured for issues without a type.
Inspired by #14980 (comment).
Current APIs:
Notes:
Axesmethods are just thin wrappers around theAxismethods.Textproperties.Issue
The Axes API feels a bit odd. AFAICS
set_xticklabelsdoes not make much sense withoutset_xticksbefore; otherwise how do I know that the labels will be at the correct places and that I have the right number of labels for the ticks.Proposal
set_xticksto beticks=Noneto be compatible with the pyplot API - though I don't know if one needs the ability to set ticks without positions.set_xticklabels. It's too widely used to be deprecated, but we shouldn't have two equal ways here.pyplot.xticks; it's not strictly necessary because pyplot may have less functionality than the OOP interface; but it doesn't hurt either.The proposed signature would be an API-change because the minor argument might have been passed positionally. Thus, we should start with
_make_keyword_onlyon that parameter.