Changeset 2175


Ignore:
Timestamp:
05/18/11 16:35:55 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No (a minor improvement)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: plot spectra with flagplotter

Put in Release Notes: No

Module(s): flagplotter, sdflag

Description: flagplotter automatically sets 5% margin between subplot x-boundaries

and spectral edges. hope this to be help for users to see/flag band edge features.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/flagplotter.py

    r2173 r2175  
    116116    plot.__doc__ = asapplotter.plot.__doc__
    117117
     118    @asaplog_post_dec
     119    def _plot(self, scan):
     120        asapplotter._plot(self,scan)
     121        # rescale x-range of subplots 5% margins
     122        ganged = (self._plotter.axes._sharex != None)
     123        if ganged:
     124            np = 1
     125        else:
     126            np = len(self._plotter.subplots)
     127        for ip in xrange(np):
     128            ax = self._plotter.subplots[ip]['axes']
     129            lim0 = ax.get_xlim()
     130            offset = (lim0[1]-lim0[0])*0.05
     131            ax.set_xlim(lim0[0]-offset,lim0[1]+offset)
     132            del ax, lim0, offset
     133    _plot.__doc__ = asapplotter._plot.__doc__
     134
    118135    def _is_new_scan(self,scan):
    119136        if isinstance(scan, scantable):
Note: See TracChangeset for help on using the changeset viewer.