title: Plotting a plot with an additional y axis on the right and an additional x axis on the top, linked to the bottom one
body: <p>I am trying to make a figure that has two plots, that share the same x axis on the bottom, one is linked to the left y axis, the other to the right y axis, and also have the top x-axis, which is a function of the bottom x-axis (current divided by area). Basically what I would like to have in the end is something like the attached figure on the left.
  So far I can only make the plots with the left and right y axis, but I cannot find the right way to also include the top x-axis. I have run out of ideas, and I would like to request you help and suggestions on how to deal with this.
  This is what I have tried so far:</p>
  
  <pre><code># Open and Plot Data
  
  fname = folder + r'/' +f
  #print(fname)
  vect = np.loadtxt(fname, delimiter=' ')
  
  current = vect[:,0]
  voltage = vect[:,1]
  power = vect[:,2]
  current_density=current/area1/1000 #in kA/cm^2
  
  
  
  fig,ax1=plt.subplots()
  ax1.plot(current,voltage)
  #l = ax2.plot(current_density,voltage)
  #l.set_visible(False)
  
  
  
  #ax1.grid(True) #add a grid to the LIV
  
  #ax2 = ax1.twinx()
  
  ax2= ax1.twinx()
  #ax2=ax1.twiny()
  ax2.plot(current, power)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tYDuA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tYDuA.jpg" alt="Basically, what I need is on the right"></a></p>