Axes.
secondary_xaxis
(location, *, functions=None, **kwargs)[source]¶Add a second x-axis to this axes.
For example if we want to have a second scale for the data plotted on the xaxis.
Parameters: | location : string or scalar
functions : 2-tuple of func, or Transform with an inverse
|
---|---|
Returns: | ax : axes._secondary_axes.SecondaryAxis |
Other Parameters: | **kwargs :
|
Warning
This method is experimental as of 3.1, and the API may change.
Examples
The main axis shows frequency, and the secondary axis shows period.
(Source code, png, pdf)
matplotlib.axes.Axes.secondary_xaxis
¶