Ignore:
Timestamp:
06/22/05 15:54:38 (19 years ago)
Author:
mar637
Message:

removed color loading as mpl now supports named colors. some minor corrections on pol label handling. Also added orientation option for ps output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapplotter.py

    r626 r652  
    121121            self._plotter.set_panels()
    122122        rows = self._cursor["t"]
    123         self._plotter.palette(1)
     123        self._plotter.palette(0)
    124124        for rowsel in rows:
    125125            i = self._cursor["t"].index(rowsel)
    126126            if n > 1:
    127                 self._plotter.palette(1)
     127                self._plotter.palette(0)
    128128                self._plotter.subplot(i)
    129129            colvals = eval(cdict2.get(colmode))
     
    214214
    215215        for scan in scans:
    216             self._plotter.palette(1)
     216            self._plotter.palette(0)
    217217            if n > 1:
    218218                self._plotter.subplot(scans.index(scan))
    219                 self._plotter.palette(1)
    220219            colvals = eval(cdict2.get(colmode))
    221220            rowsel = self._cursor["t"][0]
     
    302301        panels = self._cursor[self._panelling]       
    303302        for i in panels:
    304             self._plotter.palette(1)
     303            self._plotter.palette(0)
    305304            polmode = "raw"
    306305            ii = self._cursor[self._panelling].index(i)
     
    360359                    if self._title and len(self._title) > 0:
    361360                        tlab = self._title[ii]
    362                     else:                       
    363                         tlab = self._ldict.get(self._panelling)+' '+str(i)
     361                    else:
     362                        if self._panelling == 'p':
     363                            tlab = self._get_pollabel(scan, polmode)
     364                        else:
     365                            tlab = self._ldict.get(self._panelling)+' '+str(i)
    364366                    if self._lmap and len(self._lmap) > 0:
    365367                        llab = self._lmap[jj]
     
    512514        return
    513515
    514     def save(self, filename=None):
     516    def save(self, filename=None, orientation='landscape'):
    515517        """
    516518        Save the plot to a file. The know formats are 'png', 'ps', 'eps'.
     
    521523                          called 'yyyymmdd_hhmmss.png' is created in the
    522524                          current directory.
    523         """
    524         self._plotter.save(filename)
     525             orientation: optional parameter for postscript. 'landscape'
     526                          (default) and 'portrait' are valid.
     527        """
     528        self._plotter.save(filename,orientation)
    525529        return
    526530   
     
    614618                        polmode.append("circular")
    615619                    else:
    616                         "Pol type '%s' not valid" %i
     620                        print "Pol type '%s' not valid" %i
    617621                        return
    618622                elif 0 > i >= n:
Note: See TracChangeset for help on using the changeset viewer.