Spec-Zone.ru › Matplotlib

matplotlib.axes.Axes.twinx

Axes.twinx()[source]

Create a twin Axes sharing the xaxis.

Create a new Axes with an invisible x-axis and an independent y-axis positioned opposite to the original one (i.e. at right). The x-axis autoscale setting will be inherited from the original Axes. To ensure that the tick marks of both y-axes align, see LinearLocator.

Returns:
Axes

The newly created Axes instance

Notes

For those who are 'picking' artists while using twinx, pick events are only called for the artists in the top-most Axes.

Examples using matplotlib.axes.Axes.twinx

Parasite Simple

Parasite Simple

Parasite axis demo

Parasite axis demo

Pan/zoom events of overlapping axes

Pan/zoom events of overlapping axes

Multiple y-axis with Spines

Multiple y-axis with Spines

Axes box aspect

Axes box aspect

Plots with different scales

Plots with different scales

Quick start guide

Quick start guide

© 2012–2026 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.twinx.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API