Changes in trunk/python/asaplotbase.py [1946:1836]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asaplotbase.py
r1946 r1836 14 14 15 15 from asap.parameters import rcParams as asaprcParams 16 from asap.logging import asaplog 16 from asap.logging import asaplog, print_log 17 17 18 18 # API change in mpl >= 0.98 … … 25 25 #print "Warning: matplotlib version < 0.87. This might cause errors. Please upgrade." 26 26 asaplog.push( "matplotlib version < 0.99. This might cause errors. Please upgrade." ) 27 asaplog.post( 'WARN' )27 print_log( 'WARN' ) 28 28 29 29 class asaplotbase: … … 417 417 fname = 'asap'+dstr+'.png' 418 418 419 d = ['png','.ps','eps' , 'svg']419 d = ['png','.ps','eps'] 420 420 421 421 from os.path import expandvars … … 456 456 except IOError, msg: 457 457 #print 'Failed to save %s: Error msg was\n\n%s' % (fname, err) 458 asaplog.post()458 print_log() 459 459 asaplog.push('Failed to save %s: Error msg was\n\n%s' % (fname, str(msg))) 460 asaplog.post( 'ERROR' )460 print_log( 'ERROR' ) 461 461 return 462 462 else: … … 464 464 #print "'ps', 'eps', 'png'" 465 465 asaplog.push( "Invalid image type. Valid types are:" ) 466 asaplog.push( "'ps', 'eps', 'png' , 'svg'" )467 asaplog.post('WARN')466 asaplog.push( "'ps', 'eps', 'png'" ) 467 print_log('WARN') 468 468 469 469 … … 669 669 for tick in self.subplots[i]['axes'].xaxis.majorTicks: 670 670 tick.label1On = False 671 #self.subplots[i]['axes'].xaxis.label.set_visible(False)671 self.subplots[i]['axes'].xaxis.label.set_visible(False) 672 672 if i%cols: 673 673 # Suppress y-labels for frames not in the left column. 674 674 for tick in self.subplots[i]['axes'].yaxis.majorTicks: 675 675 tick.label1On = False 676 #self.subplots[i]['axes'].yaxis.label.set_visible(False)676 self.subplots[i]['axes'].yaxis.label.set_visible(False) 677 677 # disable the first tick of [1:ncol-1] of the last row 678 678 #if i+1 < nplots: 679 679 # self.subplots[i]['axes'].xaxis.majorTicks[0].label1On = False 680 # set axes label state for interior subplots. 681 if i%cols: 682 self.subplots[i]['axes'].yaxis.label.set_visible(False) 683 if (i <= (rows-1)*cols - 1) and (i+cols < nplots): 684 self.subplots[i]['axes'].xaxis.label.set_visible(False) 685 self.rows = rows 686 self.cols = cols 680 self.rows = rows 681 self.cols = cols 687 682 self.subplot(0) 688 683 del rows,cols,n,nplots,layout,ganged,i 689 690 684 691 685 def tidy(self): … … 700 694 if i != 0: 701 695 ax.yaxis.majorTicks[-1].label1On = False 702 ## set axes label state for interior subplots. 703 #innerax=False 704 #if i%self.cols: 705 # ax.yaxis.label.set_visible(innerax) 706 #if (i <= (self.rows-1)*self.cols - 1) and (i+self.cols < nplots): 707 # ax.xaxis.label.set_visible(innerax) 708 696 709 697 710 698 def set_title(self, title=None): … … 745 733 sp['axes'].legend(tuple(lines), tuple(labels), 746 734 self.loc, prop=fp) 747 #else:748 #sp['axes'].legend((' '))735 else: 736 sp['axes'].legend((' ')) 749 737 750 738 from matplotlib.artist import setp
Note:
See TracChangeset
for help on using the changeset viewer.