Changeset 813


Ignore:
Timestamp:
Oct 22, 2012, 8:24:19 PM (12 years ago)
Author:
aslmd
Message:

UTIL PYTHON. mcd interface. fixed a stupid bug on title when date is julian. also fixed the spacing problems with 4 plots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/mcd/mcd.py

    r812 r813  
    9595        self.title = self.name + " with " + self.dustlabel + "."
    9696        if self.datekey == 1:    self.title = self.title + " Ls " + str(self.xdate) + "deg."
    97         elif self.datekey == 0:  self.title = self.title + " JD " + str(self.title) + "."
     97        elif self.datekey == 0:  self.title = self.title + " JD " + str(self.xdate) + "."
    9898        if not oneline: self.title = self.title + "\n"
    9999        if self.lats is None:  self.title = self.title + " Latitude " + str(self.lat) + "E"
     
    466466      if isinstance(tabtodo,np.str): tabtodo=[tabtodo] ## so that asking one element without [] is possible.
    467467      if isinstance(tabtodo,np.int): tabtodo=[tabtodo] ## so that asking one element without [] is possible.
    468       fig = Figure(figsize=(8,8)) ; subv,subh = myplot.definesubplot( len(tabtodo) , fig )
     468
     469      howmanyplots = len(tabtodo)
     470      if howmanyplots == 1: fig = Figure(figsize=(16,8))
     471      elif howmanyplots == 2: fig = Figure(figsize=(8,8))
     472      elif howmanyplots == 3: fig = Figure(figsize=(8,16))
     473      elif howmanyplots == 4: fig = Figure(figsize=(16,8))
     474
     475      subv,subh = myplot.definesubplot( len(tabtodo) , fig )
    469476      for i in range(len(tabtodo)):
    470477        yeah = fig.add_subplot(subv,subh,i+1) #.grid(True, linestyle=':', color='grey')
     
    673680      if isinstance(tabtodo,np.str): tabtodo=[tabtodo] ## so that asking one element without [] is possible.
    674681      if isinstance(tabtodo,np.int): tabtodo=[tabtodo] ## so that asking one element without [] is possible.
    675       fig = Figure(figsize=(8,8)) ; subv,subh = myplot.definesubplot( len(tabtodo) , fig )
     682
     683      howmanyplots = len(tabtodo)
     684      if howmanyplots == 1: fig = Figure(figsize=(16,8))
     685      elif howmanyplots == 2: fig = Figure(figsize=(8,8))
     686      elif howmanyplots == 3: fig = Figure(figsize=(8,16))
     687      elif howmanyplots == 4: fig = Figure(figsize=(16,8))
     688
     689      subv,subh = myplot.definesubplot( len(tabtodo) , fig )
    676690
    677691      for i in range(len(tabtodo)):
Note: See TracChangeset for help on using the changeset viewer.