GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [MNT]: Consider consolidating the Formatter API · Issue #31396 · matplotlib/matplotlib

[MNT]: Consider consolidating the Formatter API #31396

New issue
Copy link
New issue
Copy link
Open
Open
[MNT]: Consider consolidating the Formatter API#31396
Copy link
Labels
Maintenancetopic: ticks axis labels

Description

@timhoffm
timhoffm
opened on Mar 26, 2026
Issue body actions

Summary

Inspired by #31392 (review)

Should we constrain the public API?

In particular, I don't think set_locs is needed publically. Calling format_ticks(values) should be sufficent and it should be possible to make the locs state an implementation detail.

Additionally, one could check / clarify the relation of __call__ and format_data. Are both needed publically?

Also #5804 may be considered.

Proposed fix

This is a tracking item for the idea. It's not yet ready to be worked on, because we first need a deeper analysis on the current usage and a discussion on the desired API.

Possible improvements:

  • Distinguish between configuration (e.g. base for LogFormatter) and context. Context is information extracted from a set of tick values that may influence how single ticks are rendered (e.g. precision or offset). The context is currently partly public. As a first step, we can make the context private (MNT: Privatize Formatter attributes #31416). This will open up possibilities for re-architecting internal logic: Currently context is stored as persistent state on the Formatter, but we may be able to remove this state (will also require making set_locs() private.
  • ...

Activity

  1. timhoffm
    added
    Maintenance
    topic: ticks axis labels
    on Mar 26, 2026
  2. timhoffm
    added 4 commits that reference this issue on Mar 28, 2026

    DOC: Improve Formatter documentation

    bd563c9

    DOC: Improve Formatter documentation

    20d7290

    DOC: Improve Formatter documentation

    f1ec45b

    DOC: Improve Formatter documentation

    40bd49d
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

    Maintenancetopic: ticks axis labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.