Index: trunk/UTIL/PYTHON/myscript.py
===================================================================
--- trunk/UTIL/PYTHON/myscript.py	(revision 457)
+++ trunk/UTIL/PYTHON/myscript.py	(revision 458)
@@ -9,10 +9,10 @@
 
     ### WHAT I PLOT
-    parser.add_option('-v', '--var',    action='append',dest='var',      type="string",  default=None,  help='variable color-shaded (append)')
+    parser.add_option('-v', '--var',    action='append',dest='var',      type="string",  default=None,  help='variable color-shaded')
     parser.add_option('-w', '--with',   action='store',dest='var2',      type="string",  default=None,  help='variable contoured')
     parser.add_option('-a', '--anomaly',action='store_true',dest='anomaly',              default=False, help='compute and plot relative anomaly in %')
     parser.add_option('--mult',         action='store',dest='mult',      type="float",   default=1.,    help='a multiplicative factor to plotted field')
-    parser.add_option('-m', '--min',    action='append',dest='vmin',     type="float",   default=None,  help='bounding minimum value (append)')    
-    parser.add_option('-M', '--max',    action='append',dest='vmax',     type="float",   default=None,  help='bounding maximum value (append)') 
+    parser.add_option('-m', '--min',    action='append',dest='vmin',     type="float",   default=None,  help='bounding minimum value [min]')    
+    parser.add_option('-M', '--max',    action='append',dest='vmax',     type="float",   default=None,  help='bounding maximum value [max]') 
     parser.add_option('-H', '--hole',   action='store_true',dest='hole',                 default=False, help='holes above max and below min')
     parser.add_option('--nolow',        action='store_true',dest='nolow',                default=False, help='plot only minima and maxima [false]')
@@ -29,13 +29,13 @@
     parser.add_option('--title',        action='store',dest='zetitle',   type="string",  default="fill",help='customize the whole title')
     parser.add_option('-T', '--tiled',  action='store_true',dest='tile',                 default=False, help='draw a tiled plot (no blank zone)')
-    parser.add_option('--res',          action='store',dest='res',       type="float",   default=200.,  help='Resolution for png outputs. --save png needed. [200.]')
-    parser.add_option('--trans',        action='store',dest='trans',     type="float",   default=1.,    help='shaded plots transparency, from 0 (transparent) to 1 (opaque) [1]')
-    parser.add_option('--area',         action='store',dest='area',       type="string",   default=None,  help='Area on the map to be plot [None]')
+    parser.add_option('--res',          action='store',dest='res',       type="float",   default=200.,  help='resolution for png outputs. --save png needed. [200.]')
+    parser.add_option('--trans',        action='store',dest='trans',     type="float",   default=1.,    help='shaded plot transparency, 0 to 1 (=opaque) [1]')
+    parser.add_option('--area',         action='store',dest='area',       type="string",   default=None,  help='area on the map to be plot [None]')
 
     ### SPECIFIC FOR MAPPING [MAPMODE 1]
     parser.add_option('-p', '--proj',   action='store',dest='proj',      type="string",  default=None,  help='projection')
     parser.add_option('-b', '--back',   action='store',dest='back',      type="string",  default=None,  help='background image [None]')
+    parser.add_option('-W', '--winds',  action='store_true',dest='winds',                default=False, help='wind vectors [False]')
     parser.add_option('-s', '--stride', action='store',dest='ste',       type="int",     default=3,     help='stride vectors [3]')
-    parser.add_option('-W', '--winds',  action='store_true',dest='winds',                default=False, help='wind vectors [False]')
     parser.add_option('-z', '--zoom',   action='store',dest='zoom',      type="float",   default=None,  help='zoom factor in %')
     parser.add_option('--blat',         action='store',dest='blat',      type="int",     default=None,  help='reference lat (or bounding lat for stere) [computed]')
@@ -64,5 +64,5 @@
     ### SPECIAL
     parser.add_option('--tsat',         action='store_true',dest='tsat',               default=False,help='convert temperature field T in Tsat-T using pressure')
-    parser.add_option('--rate',         action='store'     ,dest='rate', type="int",   default=None, help='Output is a movie along Time dimension. --time must not be specified. [None]')
+    parser.add_option('--rate',         action='store'     ,dest='rate', type="int",   default=None, help='output is a movie along Time dimension [None]')
     parser.add_option('--quality',      action='store_true',dest='quality',            default=False,help='For movie mode: improves movie quality.(slower)')
 
Index: trunk/UTIL/PYTHON/planetoplot.py
===================================================================
--- trunk/UTIL/PYTHON/planetoplot.py	(revision 457)
+++ trunk/UTIL/PYTHON/planetoplot.py	(revision 458)
@@ -72,5 +72,5 @@
     from mymath import deg,max,min,mean,get_tsat,writeascii,fig2data,fig2img
     import matplotlib as mpl
-    from matplotlib.pyplot import contour,contourf, subplot, figure, rcParams, savefig, colorbar, pcolor, show, plot, clabel, title, close
+    from matplotlib.pyplot import contour,contourf, subplot, figure, rcParams, savefig, colorbar, pcolor, show, plot, clabel, title, close, legend
     from matplotlib.cm import get_cmap
     import numpy as np
@@ -154,4 +154,5 @@
           vert = nc.variables["altitude"][:]
       elif typefile in ['meso','mesoapi','geo','mesoideal']:
+          ### the following lines are kind of dirty... not possible to ask for several lats and lons
           if vlon is not None or vlat is not None:   indices = bidimfind(lon2d,lat2d,vlon,vlat) ; print '********** INDICES: ', indices
           if slon is not None: slon[0][0] = indices[0] ; slon[0][1] = indices[0]
@@ -254,13 +255,7 @@
     print "********************************************"
     while error is False:
-       print "********** NPLOT", nplot
-      
-       ### General plot settings
+     
+       print "********** NPLOT", nplot 
        if nplot > numplot: break
-       if numplot > 1:  subplot(subv,subh,nplot)
-
-       ### Map projection                    
-       if mapmode == 1:     m = define_proj(proj,wlon,wlat,back=back,blat=blat,blon=blon) ; x, y = m(lon2d, lat2d)
-       elif mapmode ==0:    m = None ; x = None ; y = None
 
        ####################################################################
@@ -301,4 +296,11 @@
            vecy, error = reducefield( all_windv[index_f], d4=indextime, d3=indexvert, yint=yintegral, alt=vert)
        ####################################################################
+       ### General plot settings
+       changesubplot = (numplot > 1) and (len(what_I_plot.shape) != 1)  ## default for 1D plots: superimposed. to be reworked for better flexibility.
+       if changesubplot: subplot(subv,subh,nplot)
+       ### Map projection                    
+       if mapmode == 1:     m = define_proj(proj,wlon,wlat,back=back,blat=blat,blon=blon) ; x, y = m(lon2d, lat2d)
+       elif mapmode ==0:    m = None ; x = None ; y = None
+       ####################################################################
 
        if not error:
@@ -371,6 +373,6 @@
                             elif mapmode == 0:     contourf( x, y, what_I_plot_frame, zelevels, cmap = palette, alpha=trans)
                         else:
-                            if mapmode == 1:       m.pcolor( x, y, what_I_plot_frame, cmap = palette, vmin=zevmin, vmax=zevmax ,alpha=trans)
-                            elif mapmode == 0:     pcolor( x, y, what_I_plot_frame, cmap = palette, vmin=zevmin, vmax=zevmax ,alpha=trans)
+                            if mapmode == 1:       m.pcolor( x, y, what_I_plot_frame, cmap = palette, vmin=zevmin, vmax=zevmax, alpha=trans)
+                            elif mapmode == 0:     pcolor( x, y, what_I_plot_frame, cmap = palette, vmin=zevmin, vmax=zevmax, alpha=trans)
                         if colorb != 'nobar':        
                             if (fileref is not None) and (index_f is numplot-1):   daformat = "%.3f"
@@ -432,5 +434,13 @@
                ##### 1D field
                elif len(what_I_plot.shape) is 1:
-                 plot(x,what_I_plot)
+                 lbl = ""
+                 if indexlat is not None:  lbl = lbl + " ix" + str(indexlat)
+                 if indexlon is not None:  lbl = lbl + " iy" + str(indexlon)
+                 if indexvert is not None: lbl = lbl + " iz" + str(indexvert)
+                 if indextime is not None: lbl = lbl + " it" + str(indextime)
+
+                 if indexvert is not None:    plot(x,what_I_plot,label=lbl)  ## regular plot
+                 else:                        plot(what_I_plot,x,label=lbl)  ## vertical profile
+                 legend(loc='best')
                  if save == 'txt':  writeascii(np.transpose(what_I_plot),'profile'+str(nplot)+'.txt')
 
