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]: Parasite axis: right Y scale factor on wrong side? #21331

Open
@petrvokac

Description

@petrvokac

Bug summary

Parasite axis: right Y "scale factor" on wrong side?
See slightly modified example parasite_simple.py with very low values on Y2.

Code for reproduction

"""===============Parasite Simple==============="""frommpl_toolkits.axes_grid1importhost_subplotimportmatplotlib.pyplotasplthost=host_subplot(111)par=host.twinx()host.set_xlabel("Distance")host.set_ylabel("Density")par.set_ylabel("Temperature")p1,=host.plot([0,1,2], [0,1,2],label="Density")p2,=par.plot([0,1,2], [0,3.0e-10,2.0e-10],label="Temperature")leg=plt.legend()host.yaxis.get_label().set_color(p1.get_color())leg.texts[0].set_color(p1.get_color())par.yaxis.get_label().set_color(p2.get_color())leg.texts[1].set_color(p2.get_color())plt.show()

Actual outcome

parasite_simple.pdf

Expected outcome

Scaling factor on the right not on the left.

Operating system

Gentoo Linux

Matplotlib Version

'3.4.2'

Matplotlib Backend

'Qt5Agg', savefig to pdf

Python version

3.9.6

Jupyter version

No response

Other libraries

No response

Installation

Linux package manager (Debian/Fedora/etc.)

Conda channel

No response

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