I have virtually no experience with python, but I am trying to create a simple script which loads an image and uses the slider widget to adjust the minimum and maximum of the co
According to the documentation, imshow
returns a `matplotlib.image.AxesImage' object. When you put in that comma, Python assumes that the return type of the function is going to be something iterable (usually a tuple when you would be using this construction, but not necessarily) because Python lets you write code like this:
a = my_function() # a = (c, d)
a, b = my_function() # a = c, b = d
but
a, = my_function() # you should get an error
I'm not entirely sure what Python is putting in im1
without checking (but from your question I get the impression that writing im1,=...
works while im1=...
doesn't), but I suspect you are failing to draw the image for some reason. Does update
actually get called? If it does, maybe try im1.draw()
instead.