Index: /issm/trunk-jpl/src/m/plot/plot_elementnumbering.py
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_elementnumbering.py	(revision 21355)
+++ /issm/trunk-jpl/src/m/plot/plot_elementnumbering.py	(revision 21355)
@@ -0,0 +1,44 @@
+try:
+	import pylab as p
+except ImportError:
+	print "could not import pylab, matplotlib has not been installed, no plotting capabilities enabled"
+
+import numpy as  np
+from processmesh import processmesh
+from applyoptions import applyoptions
+from plot_icefront import plot_icefront
+
+def plot_elementnumbering(md,options,fig,ax):
+	'''
+	plot_elementnumbering - plot element numberign (starting at 1 matlab and c convention)
+
+		Usage:
+			plot_elementnumbering(md,options,fig,axes)
+
+		See also: PLOTMODEL
+	'''
+	
+	x,y,z,elements,is2d,isplanet=processmesh(md,[],options)
+	XLims=[np.min(x),np.max(x)]
+	YLims=[np.min(y),np.max(y)]
+	#plot mesh
+	ax.triplot(x,y,elements)
+	highlightpos=options.getfieldvalue('highlight','none')
+	if highlightpos!='none':
+		#if just one element duplicate it to avoid coloring issues
+		if type(highlightpos)==int:
+			highlightpos=[highlightpos,highlightpos]
+		#convert from to matlab numbering
+		highlightpos=[pos-1 for pos in highlightpos]
+		colors=np.asarray([0.5 for element in elements[highlightpos]])
+		ax.tripcolor(x,y,elements[highlightpos],facecolors=colors,alpha=0.5)
+	# and numbers
+	for i,element in enumerate(elements):
+		ax.text(np.mean(x[element]),np.mean(y[element]),str(i+1),ha='center',va='center')
+		
+
+	#apply options
+	options.addfielddefault('title','Element numbers')
+	options.addfielddefault('colorbar','off')
+	applyoptions(md,[],options,fig,ax)
+	
Index: /issm/trunk-jpl/src/m/plot/plot_manager.py
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_manager.py	(revision 21354)
+++ /issm/trunk-jpl/src/m/plot/plot_manager.py	(revision 21355)
@@ -8,4 +8,5 @@
 from plot_mesh import plot_mesh
 from plot_BC import plot_BC
+from plot_elementnumbering import plot_elementnumbering
 from processmesh import processmesh
 from processdata import processdata
@@ -56,5 +57,5 @@
 		options.addfielddefault('ylim',[min(md.mesh.y),max(md.mesh.y)])
 	# }}}
-	# {{{ dealing with special plot (mesh for now)
+	# {{{ dealing with special plot
 	if isinstance(data,(str,unicode)):
 		if data=='mesh': 
@@ -64,4 +65,7 @@
 		elif data=='BC': 
 			plot_BC(md,options,fig,ax)
+			return
+		elif data=='elementnumbering': 
+			plot_elementnumbering(md,options,fig,ax)
 			return
 		elif data=='none':
Index: /issm/trunk-jpl/src/m/plot/plotdoc.py
===================================================================
--- /issm/trunk-jpl/src/m/plot/plotdoc.py	(revision 21354)
+++ /issm/trunk-jpl/src/m/plot/plotdoc.py	(revision 21355)
@@ -7,5 +7,6 @@
 	pydata={'quiver':' quiver plot give data and a vector array [Vx,Vy]',
 					'mesh':' draw mesh using trisurf',
-					'BC':' this will draw all the boundary conditions (Dirichlet and Neumann).'}
+					'BC':' this will draw all the boundary conditions (Dirichlet and Neumann).',
+					'elementnumbering':' numbering of elements (matlab indices)'}
 	TODOdata={'basal_drag':' plot the basal drag on the bed (in kPa) based on the velocity in md.initialization',
 				'basal_dragx or basal_dragy' :' plot a component of the basal drag on the bed (in kPa)',
@@ -17,5 +18,4 @@
 				'driving_stress':' plot the driving stress (in kPa)',
 				'elements_type':' model used for each element',
-				'elementnumbering':' numbering of elements',
 				'vertexnumbering':' numbering of vertices',
 				'highlightelements':' to highlight elements to highlight the element list',
@@ -60,4 +60,5 @@
 						 'fontweight':" fontweight for the title 'normal', 'bold'",
 						 'fontcolor':" TODO",
+						 'highlight':" highlights certain nodes or elements when using 'nodenumbering' or 'elementnumbering' or 'highlightnodes ' or 'highlightelements' option",
 						 'title':" subplot title (string)",
 						 'xlim':" limits of X axis (all subplots) (ex: [0,500])",
@@ -107,5 +108,4 @@
 					 'insety':" [min(y) max(y)] where min(y) and max(y) are values determining the inset content",
 					 'insetpos':" [x,y,dx,dy] where x,y,dx and dy are within [0 1]",
-					 'highlight':" highlights certain nodes or elements when using 'nodenumbering' or 'elementnumbering' or 'highlightnodes ' or 'highlightelements' option",
 					 'resolution':" resolution used by section value (array of type [horizontal_resolution vertical_resolution])",
 					 'showsection':" show section used by 'sectionvalue' (string 'on' or a number of labels)",
