Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'indices': 0.07; 'problem?': 0.07; 'deletes': 0.09; 'matplotlib': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'slices': 0.09; 'pythonic': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'selected.': 0.16; 'wrote:': 0.17; 'trying': 0.21; 'bit': 0.21; "i've": 0.23; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'possibly': 0.27; 'i.e.': 0.27; 'header:X-Complaints-To:1': 0.28; 'reset': 0.29; "i'm": 0.29; 'button': 0.30; 'code': 0.31; 'from:addr:yahoo.co.uk': 0.32; 'to:addr:python-list': 0.33; 'wrong': 0.34; 'list': 0.35; 'stores': 0.35; 'received:org': 0.36; 'created': 0.36; 'should': 0.36; 'unable': 0.36; 'correctly': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'skip:l 20': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'range': 0.60; 'series': 0.63; 'intentions': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Update slider widget range Date: Thu, 22 Nov 2012 09:20:15 +0000 References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-24-212-75.ppp.as43234.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 In-Reply-To: X-Antivirus: avast! (VPS 121121-1, 21/11/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353575895 news.xs4all.nl 6871 [2001:888:2000:d::a6]:59243 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33795 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.