Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asaplotbase.py

    r1946 r1836  
    1414
    1515from asap.parameters import rcParams as asaprcParams
    16 from asap.logging import asaplog
     16from asap.logging import asaplog, print_log
    1717
    1818# API change in mpl >= 0.98
     
    2525    #print "Warning: matplotlib version < 0.87. This might cause errors. Please upgrade."
    2626    asaplog.push( "matplotlib version < 0.99. This might cause errors. Please upgrade." )
    27     asaplog.post( 'WARN' )
     27    print_log( 'WARN' )
    2828
    2929class asaplotbase:
     
    417417            fname = 'asap'+dstr+'.png'
    418418
    419         d = ['png','.ps','eps', 'svg']
     419        d = ['png','.ps','eps']
    420420
    421421        from os.path import expandvars
     
    456456            except IOError, msg:
    457457                #print 'Failed to save %s: Error msg was\n\n%s' % (fname, err)
    458                 asaplog.post()
     458                print_log()
    459459                asaplog.push('Failed to save %s: Error msg was\n\n%s' % (fname, str(msg)))
    460                 asaplog.post( 'ERROR' )
     460                print_log( 'ERROR' )
    461461                return
    462462        else:
     
    464464            #print "'ps', 'eps', 'png'"
    465465            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')
    468468
    469469
     
    669669                            for tick in self.subplots[i]['axes'].xaxis.majorTicks:
    670670                                tick.label1On = False
    671                             #self.subplots[i]['axes'].xaxis.label.set_visible(False)
     671                            self.subplots[i]['axes'].xaxis.label.set_visible(False)
    672672                    if i%cols:
    673673                        # Suppress y-labels for frames not in the left column.
    674674                        for tick in self.subplots[i]['axes'].yaxis.majorTicks:
    675675                            tick.label1On = False
    676                         #self.subplots[i]['axes'].yaxis.label.set_visible(False)
     676                        self.subplots[i]['axes'].yaxis.label.set_visible(False)
    677677                    # disable the first tick of [1:ncol-1] of the last row
    678678                    #if i+1 < nplots:
    679679                    #    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
    687682            self.subplot(0)
    688683        del rows,cols,n,nplots,layout,ganged,i
    689 
    690684
    691685    def tidy(self):
     
    700694                if i != 0:
    701695                    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
    709697
    710698    def set_title(self, title=None):
     
    745733                        sp['axes'].legend(tuple(lines), tuple(labels),
    746734                                          self.loc, prop=fp)
    747                     #else:
    748                     #    sp['axes'].legend((' '))
     735                    else:
     736                        sp['axes'].legend((' '))
    749737
    750738            from matplotlib.artist import setp
Note: See TracChangeset for help on using the changeset viewer.