Changeset 1240 for tags


Ignore:
Timestamp:
09/05/06 19:53:22 (18 years ago)
Author:
mar637
Message:

Ticket #74 - changed xaxis tick labelling to use OldScalarFormatter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/Release2.1.0b/python/asaplotbase.py

    r1153 r1240  
    1313from matplotlib import rc, rcParams
    1414from asap import rcParams as asaprcParams
    15 from matplotlib.ticker import ScalarFormatter
     15from matplotlib.ticker import OldScalarFormatter
    1616from matplotlib.ticker import NullLocator
    1717from matplotlib.transforms import blend_xy_sep_transform
     
    2020    print "Warning: matplotlib version < 0.87. This might cause errors. Please upgrade."
    2121
    22 class MyFormatter(ScalarFormatter):
    23     def __call__(self, x, pos=None):
    24         #last = len(self.locs)-2
    25         if pos==0:
    26             return ''
    27         else: return ScalarFormatter.__call__(self, x, pos)
     22#class MyFormatter(OldScalarFormatter):
     23#    def __call__(self, x, pos=None):
     24#        last = len(self.locs)-2
     25#        if pos==0:
     26#            return ''
     27#        else: return OldScalarFormatter.__call__(self, x, pos)
    2828
    2929class asaplotbase:
     
    615615                    self.subplots[i]['axes'] = self.figure.add_subplot(rows,
    616616                                                cols, i+1)
     617                    self.subplots[i]['axes'].xaxis.set_major_formatter(OldScalarFormatter())
    617618                else:
    618619                    if i == 0:
    619620                        self.subplots[i]['axes'] = self.figure.add_subplot(rows,
    620621                                                cols, i+1)
     622                        self.subplots[i]['axes'].xaxis.set_major_formatter(OldScalarFormatter())
    621623                    else:
    622624                        self.subplots[i]['axes'] = self.figure.add_subplot(rows,
     
    624626                                                sharex=self.subplots[0]['axes'],
    625627                                                sharey=self.subplots[0]['axes'])
     628
    626629                    # Suppress tick labelling for interior subplots.
    627630                    if i <= (rows-1)*cols - 1:
Note: See TracChangeset for help on using the changeset viewer.