Changeset 1562
- Timestamp:
- 04/08/09 19:20:34 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/asapplotter.py
r1457 r1562 556 556 inc = -1 557 557 # find min index 558 while start > 0 and data[start] < mn: 559 start+= inc 558 #while start > 0 and data[start] < mn: 559 # start+= inc 560 minind=start 561 for ind in xrange(start,end+inc,inc): 562 if data[ind] > mn: break 563 minind=ind 560 564 # find max index 561 while end > 0 and data[end] > mx: 562 end-=inc 563 if end > 0: end +=1 565 #while end > 0 and data[end] > mx: 566 # end-=inc 567 #if end > 0: end +=1 568 maxind=end 569 for ind in xrange(end,start-inc,-inc): 570 if data[ind] < mx: break 571 maxind=ind 572 start=minind 573 end=maxind 564 574 if start > end: 565 return end,start 566 return start,end 575 return end,start+1 576 elif start < end: 577 return start,end+1 578 else: 579 return start,end 567 580 568 581 def _reset(self): … … 605 618 if n > 1: 606 619 ganged = rcParams['plotter.ganged'] 607 ###Start Mod: 2008.09.22 kana ###608 620 if self._panelling == 'i': 609 621 ganged = False 610 ###End Mod#######################611 622 if self._rows and self._cols: 612 623 n = min(n,self._rows*self._cols) … … 688 699 ylim= self._minmaxy or [ma.minimum(y),ma.maximum(y)] 689 700 allylim += ylim 701 else: 702 xlim = self._minmaxx or [] 703 allxlim += xlim 704 ylim= self._minmaxy or [] 705 allylim += ylim 690 706 stackcount += 1 691 707 # last in colour stack -> autoscale x 692 if stackcount == nstack :708 if stackcount == nstack and len(allxlim) > 0: 693 709 allxlim.sort() 694 ###Start Mod: 2008.09.22 kana ###695 #self._plotter.axes.set_xlim([allxlim[0],allxlim[-1]])696 710 self._plotter.subplots[panelcount-1]['axes'].set_xlim([allxlim[0],allxlim[-1]]) 697 ###End Mod#######################698 711 # clear 699 712 allxlim =[] … … 705 718 if (panelcount == n) and (stackcount == nstack): 706 719 # last panel -> autoscale y if ganged 707 if rcParams['plotter.ganged'] :720 if rcParams['plotter.ganged'] and len(allylim) > 0: 708 721 allylim.sort() 709 722 self._plotter.set_limits(ylim=[allylim[0],allylim[-1]])
Note:
See TracChangeset
for help on using the changeset viewer.