Update slider widget range
Mark Lawrence
breamoreboy at yahoo.co.uk
Thu Nov 22 04:20:15 EST 2012
On 21/11/2012 13:59, moadeep wrote:
> I am trying to write a small bit of code that interactively deletes selected slices in an image series using matplotlib. I have created a button 'delete' which stores a number of indices to be deleted when the button 'update' is selected. However, I am currently unable to reset the range of my slider widget, i.e. removing the number of deleted slices from valmax. What is the pythonic solution to this problem?
>
> self.nframes = len(self.raw_dicom_stack)
If I've read your intentions correctly the line above should read
self.slider.valmax = len(self.raw_dicom_stack)
If I'm wrong then please ask on the matplotlib users mailing list or
possibly stackoverflow.
--
Cheers.
Mark Lawrence.
More information about the Python-list
mailing list