Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[MNT]: Not possible to setAutoDateFormatter rcParam to function without deprecation warning #23012

Open
@oscargus

Description

@oscargus

Summary

Not clear if it should be possible, but it is possible to use functions instead of format strings so one may think it should be possible to set thercParam to a function as well. The documentation is a bit vague and do not really encourage changing them, so maybe it is not supposed to be possible.

`.AutoDateFormatter` has a ``.scale`` dictionary that maps tick scales (the
interval in days between one major tick) to format strings; this dictionary
defaults to ::

In [1]: mpl.rcParams['date.autoformatter.year'] = lambda a: str(a)C:\Users\Oscar\AppData\Local\Temp\ipykernel_9940\331672118.py:1: MatplotlibDeprecationWarning: Support for setting an rcParam that expects a str value to a non-str value is deprecated since 3.5 and support will be removed two minor releases later.  mpl.rcParams['date.autoformatter.year'] = lambda a: str(a)

Proposed fix

Add a "string or callable" verifier and use that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp