CartesianAxes.dualx

CartesianAxes.dualx(funcscale, **kwargs)[source]

Return a secondary x axis for denoting equivalent x coordinates in alternate units.

Parameters
  • funcscale (callable(), 2-tuple of callables, or scale-spec) – The scale used to transform units from the parent axis to the secondary axis. This can be a FuncScale itself or a function, (function, function) tuple, or an axis scale specification interpreted by the Scale constructor function, any of which will be used to build a FuncScale and applied to the dual axis (see FuncScale for details).xlim, xmin, xmax, xreverse, xscale, xlabel, xtickdir, xgrid, xgridminor, xtickminor, xticklabeldir, xtickrange, xwraprange, xrotation, xformatter, xticklabels, xticks, xlocator, xminorticks, xminorlocator, xbounds, xmargin, xcolor, xlinewidth, xticklen, xgridcolor, xlabel_kw, xscale_kw, xlocator_kw, xformatter_kw, xminorlocator_kw : optional Passed to Axes.format.

  • lim, min, max, reverse, scale, label, tickdir, grid, gridminor, tickminor, ticklabeldir, tickrange, wraprange, rotation, formatter, ticklabels, ticks, locator, minorticks, minorlocator, bounds, margin, color, linewidth, ticklen, gridcolor, label_kw, scale_kw, locator_kw, formatter_kw, minorlocator_kw (optional) – Prepended with 'x' and passed to Axes.format.

Note

This enforces the following settings:

  • Places the old x axis on the bottom and the new x axis on the top.

  • Makes the old top spine invisible and the new bottom, left, and right spines invisible.

  • Adjusts the x axis tick, tick label, and axis label positions according to the visible spine positions.

  • Syncs the old and new y axis limits and scales, and makes the new y axis labels invisible.