Ignore:
Timestamp:
Jan 10, 2012, 10:36:48 AM (13 years ago)
Author:
acolaitis
Message:

GRAPHICS. Added possibility to plot 1D data. Added localtime mode (axtime lt) for 1D data (works for testphys1d data. initial localtime is asked.). Added automatic labeling of curves for multi-file testphys1d 1D plots.

File:
1 edited

Legend:

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

    r490 r494  
    9191    if not isinstance(namefiles, np.ndarray): namefiles = [namefiles]
    9292    if not isinstance(var, np.ndarray):       var = [var]
     93    initime=-1
    9394
    9495    ################################
     
    165166          else:                           errormess("no time axis found.")
    166167          if axtime in ["ls","sol"]:   errormess("not supported. should not be too difficult though.")
     168          # for 1D plots (no need for longitude computation):
     169          if axtime in ["lt"]:
     170              if initime == -1: initime=input("Please type initial local time:")
     171              time = (initime+time*24)%24
     172              print "LOCAL TIMES.... ", time
    167173      elif typefile in ['meso','mesoapi','geo','mesoideal']:
    168174          ###### STUFF TO GET THE CORRECT LAT/LON FROM MESOSCALE FILES WITH 2D LAT/LON ARRAYS
     
    428434                        if indexvert is not None: lbl = lbl + " iz" + str(indexvert[0])
    429435                        if indextime is not None: lbl = lbl + " it" + str(indextime[0])
     436                        if lbl == "": lbl = namefiles[index_f]
    430437                        if mrate is not None: x = y  ## because swapaxes...
    431438                        #what_I_plot_frame = np.diff(what_I_plot_frame, n=1) ; x = x[1:]
Note: See TracChangeset for help on using the changeset viewer.