CartesianAxes.altx

CartesianAxes.altx(**kwargs)[source]

Return an axes in the same location as this one but whose x axis is on the top. This is an alias and more intuitive name for twiny, which generates two x axes with a shared (“twin”) y axes.

Also 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.

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

Parameters
  • xlabel, xlocator, xformatter, xticks, xticklabels, xminorlocator, xminorticks, xtickminor, xticklen, xtickrange, xtickdir, xticklabeldir, xtickrotation, xwraprange, xbounds, xmargin, xcolor, xlinewidth, xgrid, xgridminor, xgridcolor, xlocator_kw, xformatter_kw, xminorlocator_kw, xlabel_kw (optional) – Passed to Axes.format.

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