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]: ax.plot(x,y) disappears after changing y_scale #25124

Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.status: confirmed bug
Milestone
@sterinaldi

Description

@sterinaldi

Bug summary

The output of ax.plot(x,y) disappears while changing y_scale from 'log' (initial scale for the y axis) to 'linear'.

Code for reproduction

importnumpyasnpimportmatplotlib.pyplotaspltsamples=np.random.normal(size=1000)x=np.linspace(-5,5,1000)fig,ax=plt.subplots()ax.hist(samples,log=True,density=True)ax.plot(x,np.exp(-x**2/2)/np.sqrt(2*np.pi))fig.savefig('log.pdf')ax.set_yscale('linear')fig.savefig('lin.pdf')

Actual outcome

lin.pdf
log.pdf

Expected outcome

lin.pdf
log.pdf

Additional information

The expected outcome is generated with matplotlib==3.5.3
fill_between and hist are working fine.

Operating system

MacOSX

Matplotlib Version

3.6.3

Matplotlib Backend

MacOSX

Python version

3.9.13

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.status: confirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp