from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
from numpy import *
import sys
app = QtGui.QApplication([])
# Data : plot in a double X axis : top (Leak data) and bottom (V data), I on Y axis
V = array([0,0.02,0.6,0.8,0.9,1,2,3,4,5])
I = array([0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9])
Leak =array([0.0000501,0.0000502,0.0000501,0.0000503,0.00005,0.00005,0.000055,0.000055,0.000065,0.0001])
pg.mkQApp()
pw = pg.PlotWidget()
pw.show()
p1 = pw.plotItem
p2 = pg.ViewBox()
p1.scene().addItem(p2)
p2.setGeometry(p1.vb.sceneBoundingRect())
p1.showAxis('top') # This results in shift of the second plot
p1.getAxis('top').linkToView(p2)
p2.setYLink(p1)
p1.plot(V,I)
p2.addItem(p1.plot(Leak,I, pen= 'b'))
sys.exit(app.exec_())