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

SymLog scale has too few ticks #17402

Open
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!
@psarka

Description

@psarka

Bug report

Bug summary

SymLog scale is exactly what I need to display various reinforcement learning related metrics as they can be both positive and negative, interesting mainly in the -10 to 10 range, and frequently explode to very large values only to come back "to sanity" later.

Unfortunately, if things go well and metrics don't go insane, current SymLog graphs have too few ticks and is not possible to understand what am I looking at. Here is a synthetic example that illustrates the issue quite well:

Code for reproduction

importmatplotlib.pyplotaspltimportnumpyasnpst=np.random.standard_cauchy(size=25)en=np.random.standard_cauchy(size=25)fig,axen=plt.subplots(5,5,figsize=(20,20))fig.tight_layout()forax,s,einzip(np.ravel(axen),st,en):ax.plot(np.linspace(s,e,5))ax.set_yscale('symlog')

Actual outcome

image

Expected outcome

It would be awesome to get more ticks and nicer labels!

Matplotlib version

matplotlib 3.1.1

I think the versions of all the remaining stuff are irrelevant, as this is an issue in the SymmetricalLogLocator class, which is built on an assumption that does not hold in my case:

        # b) has a tick at 0 and only 0 (we assume t is a small        # number, and the linear segment is just an implementation        # detail and not interesting.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp