Changeset 1213 for tags


Ignore:
Timestamp:
08/29/06 20:20:31 (18 years ago)
Author:
mar637
Message:

Ticket #63 - color/colour alias

File:
1 edited

Legend:

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

    r1175 r1213  
    22from asap import NUM
    33import matplotlib.axes
     4import sre
    45
    56class asapplotter:
     
    153154        Parameters:
    154155            stacking:     tell the plotter which variable to plot
    155                           as line color overlays (default 'pol')
     156                          as line colour overlays (default 'pol')
    156157            panelling:    tell the plotter which variable to plot
    157158                          across multiple panels (default 'scan'
     
    329330        return
    330331
    331     def set_colors(self, colormap):
    332         """
    333         Set the colors to be used. The plotter will cycle through
    334         these colors when lines are overlaid (stacking mode).
    335         Parameters:
    336             colormap:     a list of colour names
     332    def set_colors(self, colmap):
     333        """
     334        Set the colours to be used. The plotter will cycle through
     335        these colours when lines are overlaid (stacking mode).
     336        Parameters:
     337            colmap:     a list of colour names
    337338        Example:
    338339             plotter.set_colors("red green blue")
     
    341342             # and 'V' will be 'red' again.
    342343        """
    343         if isinstance(colormap,str):
    344             colormap = colormap.split()
    345         self._plotter.palette(0,colormap=colormap)
    346         if self._data: self.plot(self._data)
     344        if isinstance(colmap,str):
     345            colmap = colmap.split()
     346        self._plotter.palette(0, colormap=colmap)
     347        if self._data: self.plot(self._data)
     348
     349    # alias for english speakers
     350    set_colours = set_colors
    347351
    348352    def set_histogram(self, hist=True, linewidth=None):
Note: See TracChangeset for help on using the changeset viewer.