CartesianAxes.twiny

CartesianAxes.twiny()[source]

Return an axes in the same location as this one but whose x axis is on the top. Mimics matplotlib.axes.Axes.twiny.

Parameters
  • 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.