Changeset 2989 for trunk/python


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

New Development: No

JIRA Issue: Yes (related to CAS-6704)

Ready for Test: Yes

Interface Changes: No

What Interface Changes:

Test Programs: plot pointing for a single raster row.

Put in Release Notes: No

Module(s): asapplotter, sdplot

Description: An improvement to asapplotter.plotpointing2. Expand plot ranges in case of single pointing or single raster row is selected.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapplotter.py

    r2988 r2989  
    15771577        # reverse x-axis
    15781578        xmin, xmax = self.gca().get_xlim()
    1579         self._plotter.set_limits(xlim=[xmax,xmin])
     1579        ymin, ymax = self.gca().get_ylim()
     1580        # expand plotrange if xmin==xmax or ymin==ymax
     1581        if abs(ymax-ymin) < 1.e-3: #~4arcsec
     1582            delx = 0.5*abs(xmax - xmin)
     1583            if delx < 5.e-4:
     1584                dxy = 5.e-4 #~2arcsec
     1585                (ymin, ymax) = (ymin-dxy, ymax+dxy)
     1586                (xmin, xmax) = (xmin-dxy, xmax+dxy)
     1587            (ymin, ymax) = (ymin-delx, ymax+delx)
     1588        elif abs(xmax-xmin) < 1.e-3:
     1589            dely = 0.5*abs(ymax - ymin)
     1590            (xmin, xmax) = (xmin-dely, xmax+dely)
     1591        self._plotter.set_limits(xlim=[xmax,xmin], ylim=[ymin, ymax])
    15801592
    15811593        self._plotter.release()
Note: See TracChangeset for help on using the changeset viewer.