def axis(name=None, cols=None, values=None, units=None):
 ax = {}
 cNameOrder = ['name', 'units', 'title']
 if (name is not None):
  ax['name'] = name
 if (values is not None):
  ax['values'] = values
 if (units is not None):
  ax['units'] = units
 if (cols is not None):
  ax['cols'] = []
  for c in cols:
   if ((type(c) != list) and (type(c) != tuple)):
    c = [c]
   col = {}
   for i in range(0, len(c)):
    col[cNameOrder[i]] = c[i]
   ax['cols'].append(col)
 return ax

def axis ( name = None , cols = None , values = None , units = None ) : ax = { } cNameOrder = [ 'name' , 'units' , 'title' ] if ( name is not None ) : ax [ 'name' ] = name if ( values is not None ) : ax [ 'values' ] = values if ( units is not None ) : ax [ 'units' ] = units if ( cols is not None ) : ax [ 'cols' ] = [ ] for c in cols : if ( ( type ( c ) != list ) and ( type ( c ) != tuple ) ) : c = [ c ] col = { } for i in range ( 0 , len ( c ) ) : col [ cNameOrder [ i ] ] = c [ i ] ax [ 'cols' ] . append ( col ) return ax
convenience method to get or set axis properties .