Hello,
I am trying to use ImageView to display an image but with axis included and
specified y range. Basically I'm doing something like this:
plt = pg.PlotItem(labels={'bottom':('time',''),'left':('frequency','')})
imv = pg.ImageView(view=plt)
x0, x1 = (0, 500)
y0, y1 = (0, 16)
xscale = (x1-x0)/img.shape[0]
yscale = (y1-y0)/img.shape[1]
imv.setImage(img, pos=[x0,y0], scale=[xscale, yscale])
plt.setAspectLocked(False)
Now the xaxis runs 0 to 500 left to right, but the yaxis runs 0 to 16 top
to bottom. However, I want the yaxis to start at the bottom at 0 and run
to 16 at the top (a usual increasing y axis). I am not sure how to set the
axis range within ImageView.
Thanks,
Steve
--
You received this message because you are subscribed to the Google Groups
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyqtgraph/96aa41d8-a1cd-45dd-ba55-c58e8eba265d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.