Ah, yes, PlotImage.invertY(False) worked!

Thanks!
Steve


On Thursday, May 3, 2018 at 12:10:27 PM UTC-4, Luke Campagnola wrote:
>
> You can use `PlotItem.invertY(False)` to set the direction of the y axis. 
> You might also need to use the `axes` argument to `ImageView.setImage()`, 
> depending on the order of axes in your image data.
>
> On Wed, May 2, 2018 at 1:53 PM, S Martin <[email protected] <javascript:>> 
> wrote:
>
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pyqtgraph/96aa41d8-a1cd-45dd-ba55-c58e8eba265d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/pyqtgraph/96aa41d8-a1cd-45dd-ba55-c58e8eba265d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/e739d6d2-a78f-401e-ae39-e66d53557d4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to