Index: /trunk/UTIL/PYTHON/planetoplot_v2/examples/histo.py
===================================================================
--- /trunk/UTIL/PYTHON/planetoplot_v2/examples/histo.py	(revision 1002)
+++ /trunk/UTIL/PYTHON/planetoplot_v2/examples/histo.py	(revision 1002)
@@ -0,0 +1,8 @@
+#! /usr/bin/env python
+from ppclass import pp
+import matplotlib.pyplot as mpl
+import numpy as np
+
+icetot = pp(file="/home/aymeric/Big_Data/DATAPLOT/diagfired.nc",var="icetot",t="0.5,2.5",compute="nothing").getf()
+mpl.hist(np.ravel(icetot))
+mpl.show()
Index: /trunk/UTIL/PYTHON/planetoplot_v2/examples/zonalmean.py
===================================================================
--- /trunk/UTIL/PYTHON/planetoplot_v2/examples/zonalmean.py	(revision 1001)
+++ /trunk/UTIL/PYTHON/planetoplot_v2/examples/zonalmean.py	(revision 1002)
@@ -6,5 +6,5 @@
 temp.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc"
 temp.var = "temp"
-temp.x = "-180,180"
+temp.x = "-180,175"
 temp.y = "-90,90"
 temp.t = "0,1"
@@ -18,5 +18,5 @@
 u.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc"
 u.var = "u"
-u.x = "-180,180"
+u.x = "-180,175"
 u.y = None
 u.t = "0.5"
Index: /trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py
===================================================================
--- /trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py	(revision 1001)
+++ /trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py	(revision 1002)
@@ -623,5 +623,6 @@
               obj = self.request[i][j][t][z][y][x]
               obj.getfield()
-              obj.computations()
+              if self.compute != "nothing":
+                  obj.computations()
               # save fields in self.f for the user
               self.f[count] = obj.field
@@ -1296,5 +1297,7 @@
           # if xy axis are apparently undefined, set 2D grid points axis.
           if "grid points" not in self.name_x:
-            if self.field_x.all() == self.field_x[0,0]:
+            if self.field_x.all() == self.field_x[0,0] \
+             or self.field_x.min() == self.field_x.max() \
+             or self.field_y.min() == self.field_y.max():
                if self.verbose: print "!! WARNING !! xy axis look undefined. creating non-dummy ones."
                self.field_x = np.array(range(self.dim_x)) ; self.name_x = "x grid points"
Index: /trunk/UTIL/PYTHON/planetoplot_v2/ppcompute.py
===================================================================
--- /trunk/UTIL/PYTHON/planetoplot_v2/ppcompute.py	(revision 1001)
+++ /trunk/UTIL/PYTHON/planetoplot_v2/ppcompute.py	(revision 1002)
@@ -100,4 +100,12 @@
 ################
 ### TBD: works with missing values
+
+def smooth2diter(field,n=1):
+        count = 0
+        result = field
+        while count < n:
+            result = smooth2d(result, window=2)
+            count = count + 1
+        return result
 
 ## Author: AS. uses gauss_kern and blur_image.
Index: /trunk/UTIL/PYTHON/planetoplot_v2/ppplot.py
===================================================================
--- /trunk/UTIL/PYTHON/planetoplot_v2/ppplot.py	(revision 1001)
+++ /trunk/UTIL/PYTHON/planetoplot_v2/ppplot.py	(revision 1002)
@@ -262,4 +262,6 @@
 # ----------------------------------
 def writeascii (field=None,absc=None,name=None):
+    field = np.array(field)
+    absc = np.array(absc)
     if name is None:
         name = "prof"
@@ -368,4 +370,5 @@
     def check(self):
         if self.field is None: print "!! ERROR !! Please define a field to be plotted" ; exit()
+        else: self.field = np.array(self.field) # ensure this is a numpy array
 
     # define_from_var
@@ -454,4 +457,6 @@
             self.absc = np.array(range(self.field.shape[0]))
             print "!! WARNING !! dummy coordinates on x axis"
+        else:
+            self.absc = np.array(self.absc) # ensure this is a numpy array
         # swapping if requested
         if self.swap:  x = self.field ; y = self.absc
@@ -770,8 +775,12 @@
         if self.addvecx is not None and self.addvecy is not None: 
                 # vectors on map projection or simple 2D mapping
-                if self.mapmode: [vecx,vecy] = m.rotate_vector(self.addvecx,self.addvecy,self.absc,self.ordi) # for metwinds only ?
-                else: vecx,vecy = self.addvecx,self.addvecy ; x,y = np.meshgrid(x,y)
+                if self.mapmode: 
+                   [vecx,vecy] = m.rotate_vector(self.addvecx,self.addvecy,self.absc,self.ordi) # for metwinds only ?
+                else:
+                   vecx,vecy = self.addvecx,self.addvecy 
+                   if x.ndim < 2 and y.ndim < 2: x,y = np.meshgrid(x,y)
                 # reference vector is scaled
-                if self.wscale is None: self.wscale = ppcompute.mean(np.sqrt(self.addvecx*self.addvecx+self.addvecy*self.addvecy))
+                if self.wscale is None: 
+                    self.wscale = ppcompute.mean(np.sqrt(self.addvecx*self.addvecx+self.addvecy*self.addvecy))
                 # make vector field
                 if self.mapmode: 
