docstr: Create a twin of Axes with a shared x-axis but independent y-axis.
  
  The y-axis of self will have ticks on the left and the returned axes
  will have ticks on the right.
docstr_tok: ["Create","a","twin","of","Axes","with","a","shared","x-axis","but","independent","y-axis",".","The","y-axis","of","self","will","have","ticks","on","the","left","and","the","returned","axes","will","have","ticks","on","the","right","."]
code: def twinx(self, axes_class=None):
      """
      Create a twin of Axes with a shared x-axis but independent y-axis.
  
      The y-axis of self will have ticks on the left and the returned axes
      will have ticks on the right.
      """
      ax = self._add_twin_axes(axes_class, sharex=self)
      self.axis["right"].set_visible(False)
      ax.axis["right"].set_visible(True)
      ax.axis["left", "top", "bottom"].set_visible(False)
      return ax
  
imports: from matplotlib import _api, cbook
  import matplotlib.artist
  import matplotlib.transforms
  from matplotlib.transforms import Bbox
  from .mpl_axes import Axes
label_desc: Use image node_id 6 for calling the HostAxesBase obj's underlying member method code with example usage: obj.twinx(axes_class) and returns: ax