Changes in trunk/python/asaplotbase.py [1836:1946]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asaplotbase.py
r1836 r1946 14 14 15 15 from asap.parameters import rcParams as asaprcParams 16 from asap.logging import asaplog , print_log16 from asap.logging import asaplog 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 print_log( 'WARN' )27 asaplog.post( 'WARN' ) 28 28 29 29 class asaplotbase: … … 417 417 fname = 'asap'+dstr+'.png' 418 418 419 d = ['png','.ps','eps' ]419 d = ['png','.ps','eps', 'svg'] 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 print_log()458 asaplog.post() 459 459 asaplog.push('Failed to save %s: Error msg was\n\n%s' % (fname, str(msg))) 460 print_log( 'ERROR' )460 asaplog.post( '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' " )467 print_log('WARN')466 asaplog.push( "'ps', 'eps', 'png', 'svg'" ) 467 asaplog.post('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 self.rows = rows 681 self.cols = cols 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 682 687 self.subplot(0) 683 688 del rows,cols,n,nplots,layout,ganged,i 689 684 690 685 691 def tidy(self): … … 694 700 if i != 0: 695 701 ax.yaxis.majorTicks[-1].label1On = False 696 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 697 709 698 710 def set_title(self, title=None): … … 733 745 sp['axes'].legend(tuple(lines), tuple(labels), 734 746 self.loc, prop=fp) 735 else:736 sp['axes'].legend((' '))747 #else: 748 # sp['axes'].legend((' ')) 737 749 738 750 from matplotlib.artist import setp
Note:
See TracChangeset
for help on using the changeset viewer.