Changeset 2977 for trunk/python


Ignore:
Timestamp:
07/25/14 19:21:04 (10 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-6564)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): asapplotter, sdplot

Description: Fixed a bug in azel plot which causes an error by too many minor ticks for some data.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapplotter.py

    r2953 r2977  
    13541354                                 wspace=wsp,hspace=hsp)
    13551355
    1356         tdel = max(t) - min(t)
     1356        tdel = max(t) - min(t) # interval in day
    13571357        ax = PL.subplot(2,1,1)
    13581358        el = ma.masked_array(array(self._data.get_elevation())*180./pi, mask)
    13591359        PL.ylabel('El [deg.]')
    13601360        dstr = dates[0].strftime('%Y/%m/%d')
    1361         if tdel > 1.0:
     1361        if tdel > 1.0: # >1day
    13621362            dstr2 = dates[len(dates)-1].strftime('%Y/%m/%d')
    13631363            dstr = dstr + " - " + dstr2
     
    13651365            minloc = HourLocator(range(0,23,12))
    13661366            timefmt = DateFormatter("%b%d")
    1367         elif tdel > 24./60.:
     1367        elif tdel > 24./60.: # 9.6h - 1day
    13681368            timefmt = DateFormatter('%H:%M')
    13691369            majloc = HourLocator()
    1370             minloc = MinuteLocator(30)
    1371         else:
     1370            minloc = MinuteLocator(range(0,60,30))
     1371        elif tdel > 2./24.: # 2h-9.6h
    13721372            timefmt = DateFormatter('%H:%M')
    1373             majloc = MinuteLocator(interval=5)
     1373            majloc = HourLocator()
     1374            minloc = MinuteLocator(range(0,60,10))
     1375        elif tdel> 10./24./60.: # 10min-2h
     1376            timefmt = DateFormatter('%H:%M')
     1377            majloc = MinuteLocator(range(0,60,10))
     1378            minloc = MinuteLocator()
     1379        else: # <10min
     1380            timefmt = DateFormatter('%H:%M')
     1381            majloc = MinuteLocator()
    13741382            minloc = SecondLocator(30)
    13751383
Note: See TracChangeset for help on using the changeset viewer.