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

[Bug]: latex font doesn't apply to formatted ticks #26179

Open
@hahmadi-cmu-F24

Description

@hahmadi-cmu-F24

Bug summary

When latex is turned on and tick format uses specific formatters (i.e logformattermathtext, scalarformatter with scientific tuned on), the font doesn't apply and switches back to serif.

Code for reproduction

importmatplotlib.pyplotaspltimportmatplotlib.tickerastickerplt.rcParams.update({"text.usetex":True,"font.family":"sans-serif"})fig,ax=plt.subplots()plt.plot(range(10))plt.title('Center Title')plt.title('Left Title',loc='left')plt.title('Right Title',loc='right')formatter=ticker.ScalarFormatter()formatter.set_scientific(False)ax.yaxis.set_major_formatter(formatter)ax.xaxis.set_minor_formatter(ticker.FormatStrFormatter('%s'))ax.set_xticklabels(ax.get_xticks())plt.show()

Actual outcome

deletethiss

Expected outcome

The yticks should match the xtick/labels font (sans-serif) even though the formatting is different.

Additional information

No response

Operating system

Linux

Matplotlib Version

3.5

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    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