SubplotGrid.dualy¶
- SubplotGrid.dualy(*args, **kwargs)¶
Add an axes locked to the same location whose y axis denotes equivalent coordinates in alternate units for every axes in the grid. This is an alternative to
matplotlib.axes.Axes.secondary_yaxiswith additional convenience features.- Parameters
funcscale (
callable(),2-tupleofcallables, orscale-spec) – The scale used to transform units from the parent axis to the secondary axis. This can be aFuncScaleitself or a function, (function, function) tuple, or an axis scale specification interpreted by theScaleconstructor function, any of which will be used to build aFuncScaleand applied to the dual axis (seeFuncScalefor details).**kwargs – Passed to
CartesianAxes. Supports all validformatkeywords. You can optionally omit the y from keywords beginning withy– for exampleax.alty(lim=(0, 10))is equivalent toax.alty(ylim=(0, 10)). You can also change the default side for the axis spine, axis tick marks, axis tick labels, and/or axis labels by passinglockeywords. For example,ax.alty(loc='left')changes the default side from right to left.
- Returns
proplot.axes.CartesianAxes– The resulting axes.
Note
This enforces the following default settings:
Places the old y axis on the left and the new y axis on the right.
Makes the old right spine invisible and the new left, bottom, and top spines invisible.
Adjusts the y axis tick, tick label, and axis label positions according to the visible spine positions.
Syncs the old and new x axis limits and scales, and makes the new x axis labels invisible.