Changeset 1923


Ignore:
Timestamp:
09/13/10 12:47:19 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-2449)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: run sdplot with plottype='azel' or 'pointing',

and sd.rcParamsplotter.gui=False

Put in Release Notes: No

Module(s): sdplot and asapplotter.plotazel, asapplotter.plotpointing

Description:

Enabled plot azel and pointings without display when sd.rcParamsplotter.gui=False.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapplotter.py

    r1913 r1923  
    10691069
    10701070    def plotazel(self, scan=None, outfile=None):
    1071     #def plotazel(self):
    10721071        """
    10731072        plot azimuth and elevation versus time of a scantable
    10741073        """
     1074        visible = rcParams['plotter.gui']
    10751075        from matplotlib import pylab as PL
    10761076        from matplotlib.dates import DateFormatter, timezone
     
    10781078        from matplotlib.ticker import MultipleLocator
    10791079        from numpy import array, pi
     1080        if not visible or not self._visible:
     1081            PL.ioff()
     1082            from matplotlib.backends.backend_agg import FigureCanvasAgg
     1083            PL.gcf().canvas.switch_backends(FigureCanvasAgg)
    10801084        self._data = scan
    10811085        self._outfile = outfile
     
    10871091        PL.clf()
    10881092        # Adjust subplot layouts
    1089         if len(self._panellayout) !=6: self.set_panellayout(refresh=False)
     1093        if len(self._panellayout) != 6:
     1094            self.set_panellayout(refresh=False)
    10901095        lef, bot, rig, top, wsp, hsp = self._panellayout
    10911096        PL.gcf().subplots_adjust(left=lef,bottom=bot,right=rig,top=top,
     
    11671172
    11681173    def plotpointing(self, scan=None, outfile=None):
    1169     #def plotpointing(self):
    11701174        """
    11711175        plot telescope pointings
    11721176        """
     1177        visible = rcParams['plotter.gui']
    11731178        from matplotlib import pylab as PL
    11741179        from numpy import array, pi
     1180        if not visible or not self._visible:
     1181            PL.ioff()
     1182            from matplotlib.backends.backend_agg import FigureCanvasAgg
     1183            PL.gcf().canvas.switch_backends(FigureCanvasAgg)
    11751184        self._data = scan
    11761185        self._outfile = outfile
     
    11821191        PL.clf()
    11831192        # Adjust subplot layouts
    1184         if len(self._panellayout) !=6: self.set_panellayout(refresh=False)
     1193        if len(self._panellayout) != 6:
     1194            self.set_panellayout(refresh=False)
    11851195        lef, bot, rig, top, wsp, hsp = self._panellayout
    11861196        PL.gcf().subplots_adjust(left=lef,bottom=bot,right=rig,top=top,
Note: See TracChangeset for help on using the changeset viewer.