Changeset 1039 for trunk/UTIL


Ignore:
Timestamp:
Sep 13, 2013, 8:31:54 PM (11 years ago)
Author:
aslmd
Message:

UTIL PYTHON. fix the #!@& bug of non-centered cyl maps (and insufficient space for colorbar labels).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/planetoplot_v2/ppplot.py

    r1029 r1039  
    772772                        llcrnrlat=wlat[0],urcrnrlat=wlat[1],\
    773773                        llcrnrlon=wlon[0],urcrnrlon=wlon[1])
     774            # some projections need to be translated to the left for colorbar + labels
     775            if self.proj in ["ortho","cyl"]:
     776                ax = mpl.gca()
     777                pos = ax.get_position().bounds
     778                newpos = [0.,pos[1],pos[2],pos[3]]
     779                ax.set_position(newpos)
    774780            # draw meridians and parallels
    775781            ft = int(mpl.rcParams['font.size']*3./4.)
Note: See TracChangeset for help on using the changeset viewer.