I've searched in this group solution to my problem but couldn't find it. Probably, answer is very simple, but I'm a newbie and I'll be very grateful if anyone could help me.
I'm trying to use multiple horizontal axes with ImageView. All axes should be linked (I want to zoom and move them at the same time) to one image, but with different ranges, units and labels.
I have a problem with setting different ranges for different axes, all show values of the first axis. setScale() parameter is not enough to get what I want.
pbox = pg.ViewBox()
self.graph = pg.PlotItem(viewBox=pbox, labels={'bottom': ('time', 'sec'), 'left': ('freq', 'kHz')},title=self.title, axisItems={'bottom': self.axis})
self.imv = pg.ImageView(view=self.graph)
self.imv.getView().invertY(False)
self.maps=10*np.log10(self.maps)+10
self.imv.setImage(self.maps,levels=(0, np.max(self.maps)), pos=[self.x0, self.y0], scale=[self.xscale, self.yscale])
self.graph.setAspectLocked(False)
## create a new AxisItem, linked to view
self.ax2 = pg.AxisItem('bottom')
self.graph.layout.addItem(self.ax2, 4, 1)
self.ax2.linkToView(pbox)
self.ax2.setLabel('latitude', color='#0000ff')
## create another AxisItem, linked to view
self.ax3 = pg.AxisItem('bottom')
self.graph.layout.addItem(self.ax3, 5, 1)
self.ax3.linkToView(pbox)
self.ax3.setLabel('longitude', color='#ff0000')