Index: /issm/trunk/src/m/model/SectionValues.m
===================================================================
--- /issm/trunk/src/m/model/SectionValues.m	(revision 6285)
+++ /issm/trunk/src/m/model/SectionValues.m	(revision 6286)
@@ -82,5 +82,6 @@
 
 	%Interpolation of data on specified points
-	data_interp=InterpFromMeshToMesh2d(md.elements,md.x,md.y,data,X,Y);
+	%data_interp=InterpFromMeshToMesh2d(md.elements,md.x,md.y,data,X,Y);
+	data_interp=griddata(md.x,md.y,data,X,Y);
 
 	%Compute index
Index: /issm/trunk/src/m/model/mechanicalproperties.m
===================================================================
--- /issm/trunk/src/m/model/mechanicalproperties.m	(revision 6285)
+++ /issm/trunk/src/m/model/mechanicalproperties.m	(revision 6286)
@@ -48,6 +48,6 @@
 %compute viscosity
 nu=zeros(numberofelements,1);
-B_bar=md.B(index)*summation/3;
-power=(md.n-1)./(2*md.n);
+B_bar=md.rheology_B(index)*summation/3;
+power=(md.rheology_n-1)./(2*md.rheology_n);
 second_inv=(ux.^2+vy.^2+((uy+vx).^2)/4+ux.*vy);
 %some corrections
Index: /issm/trunk/src/m/model/plot/applyoptions.m
===================================================================
--- /issm/trunk/src/m/model/plot/applyoptions.m	(revision 6285)
+++ /issm/trunk/src/m/model/plot/applyoptions.m	(revision 6286)
@@ -191,4 +191,5 @@
 else
 	%do nothing
+	
 end
 
Index: /issm/trunk/src/m/model/plot/plot_manager.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_manager.m	(revision 6285)
+++ /issm/trunk/src/m/model/plot/plot_manager.m	(revision 6286)
@@ -105,4 +105,9 @@
 			plot_segments(md,options,subplotwidth,i,data)
 			return
+		
+		case 'quiver'
+			plot_quiver(md,options,nlines,ncols,i);
+			return
+
 		case {'strainrate_tensor','strainrate','strainrate_principal','strainrate_principalaxis1','strainrate_principalaxis2','strainrate_principalaxis3',...
 				'stress_tensor','stress','stress_principal','stress_principalaxis1','stress_principalaxis2','stress_principalaxis3',...
Index: /issm/trunk/src/m/model/plot/plot_quiver.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_quiver.m	(revision 6285)
+++ /issm/trunk/src/m/model/plot/plot_quiver.m	(revision 6286)
@@ -1,3 +1,3 @@
-function plot_quiver(x,y,u,v,options),
+function plot_quiver(md,options,nlines,ncols,index);
 %PLOT_QUIVER - quiver plot with colors
 %
@@ -10,6 +10,16 @@
 %      plot_quiver(md.x,md.y,md.vx,md.vy,options);
 
+%prepare plot
+subplot(nlines,ncols,index); 
+hold on
+
+fields=getfieldvalue(options,'quiver_field',{'vx','vy'});
+
+%call fields vx and vy, for ease of use
+if ischar(fields{1}), vx=md.(fields{1}); else vx=fields{1}; end
+if ischar(fields{2}), vy=md.(fields{2}); else vy=fields{2}; end
+
 %process fields
-[quivers,palette]=quiver_process(x,y,u,v,options);
+[quivers,palette]=quiver_process(md.x,md.y,vx,vy,options);
 
 %loop over the number of colors
@@ -25,2 +35,8 @@
 %take care of colorbar
 quiver_colorbar(quivers,options);
+
+
+%apply options
+options=addfielddefault(options,'title','Quiver plot.');
+options=addfielddefault(options,'colorbar',1);
+applyoptions(md,[],options);
Index: /issm/trunk/src/m/model/plot/plot_riftpenetration.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_riftpenetration.m	(revision 6285)
+++ /issm/trunk/src/m/model/plot/plot_riftpenetration.m	(revision 6286)
@@ -58,12 +58,15 @@
 		plot(x(md.rifts(i).tips(2)),y(md.rifts(i).tips(2)),'g*');
 	end
-	if isp1 & isp2
-		legend([h1,h2,p1,p2],'mesh boundaries','rift tips',' rifts closing','rifts opening')
-	elseif isp1
-		legend([h1,h2,p1],'mesh boundaries','rift tips',' rifts closing')
-	elseif isp2
-		legend([h1,h2,p2],'mesh boundaries','rift tips','rifts opening')
-	else
-		legend([h1,h2],'mesh boundaries','rift tips')
+	if strcmpi(getfieldvalue(options,'legend','on'),'on'),
+		if isp1 & isp2
+			l=legend([h1,h2,p1,p2],'mesh boundaries','crack tips','faults','rifts');
+		elseif isp1
+			l=legend([h1,h2,p1],'mesh boundaries','crack tips','faults');
+		elseif isp2
+			l=legend([h1,h2,p2],'mesh boundaries','crack tips','rifts');
+		else
+			l=legend([h1,h2],'mesh boundaries','crack tips');
+		end
+		set(l,'Location',getfieldvalue(options,'legend_location','NorthEast'));
 	end
 else
@@ -73,5 +76,5 @@
 
 %apply options
-options=addfielddefault(options,'title','Rift Penetration');
+options=addfielddefault(options,'title','Rift/Fault location');
 options=addfielddefault(options,'colorbar',0);
 applyoptions(md,[],options);
Index: /issm/trunk/src/m/model/plot/plot_riftrelvel.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_riftrelvel.m	(revision 6285)
+++ /issm/trunk/src/m/model/plot/plot_riftrelvel.m	(revision 6286)
@@ -65,5 +65,5 @@
 	segments=md.rifts(i).segments;
 	for j=1:size(segments,1),
-		plot(x(segments(j,1:2)),y(segments(j,1:2)),'b-');
+		plot(x(segments(j,1:2)),y(segments(j,1:2)),'k-');
 	end
 
@@ -76,33 +76,38 @@
 		penetration=(vx2-vx1)*normal(1)+(vy2-vy1)*normal(2);
 		%if penetration is negative, plot in black, positive, plot in red;: ie: if rift is closing, black, if rift is opening, red.
-		if(penetration>0),
-			p2=plot(x(penaltypairs(j,1)) ,y(penaltypairs(j,1)),'*'); set(p2,'Color',[140 140 140]/255);
-			isp2=1;
-		else
-			p1=plot(x(penaltypairs(j,1)) ,y(penaltypairs(j,1)),'k*');
-			isp1=1;
-		end
+		%if(penetration>0),
+		%	p2=plot(x(penaltypairs(j,1)) ,y(penaltypairs(j,1)),'*'); set(p2,'Color',[140 140 140]/255);
+		%	isp2=1;
+		%else
+		%	p1=plot(x(penaltypairs(j,1)) ,y(penaltypairs(j,1)),'k*');
+		%	isp1=1;
+		%end
 	end
 
 	%point out the tips
-	h2=plot(x(md.rifts(i).tips(1)),y(md.rifts(i).tips(1)),'g*');
-	plot(x(md.rifts(i).tips(2)),y(md.rifts(i).tips(2)),'g*');
-	segments=md.rifts(i).segments(:,1:2);
+	%h2=plot(x(md.rifts(i).tips(1)),y(md.rifts(i).tips(1)),'g*');
+	%plot(x(md.rifts(i).tips(2)),y(md.rifts(i).tips(2)),'g*');
+	%segments=md.rifts(i).segments(:,1:2);
 end
 %legend
-if isp1 & isp2
-	legend([h1,h2,p1,p2],'mesh boundaries','rift tips',' rifts closing','rifts opening')
-elseif isp1
-	legend([h1,h2,p1],'mesh boundaries','rift tips',' rifts closing')
-elseif isp2
-	legend([h1,h2,p2],'mesh boundaries','rift tips','rifts opening')
-else
-	legend([h1,h2],'mesh boundaries','rift tips')
+if strcmpi(getfieldvalue(options,'legend','on'),'on'),
+	if isp1 & isp2
+		l=legend([h1,h2,p1,p2],'mesh boundaries','crack tips','faults','rifts');
+	elseif isp1
+		l=legend([h1,h2,p1],'mesh boundaries','crack tips','faults');
+	elseif isp2
+		l=legend([h1,h2,p2],'mesh boundaries','crack tips','rifts');
+	else
+		l=legend([h1,h2],'mesh boundaries','crack tips');
+	end
+set(l,'Location',getfieldvalue(options,'legend_location','NorthEast'));
 end
 hold off
+
+
 
 %apply options
 quiver_colorbar(quivers,options);
 options=changefieldvalue(options,'colorbar',2);
-options=addfielddefault(options,'title','Rift Relative Velocities');
+options=addfielddefault(options,'title','Rift/Fault Relative Velocity');
 applyoptions(md,[],options);
Index: /issm/trunk/src/m/model/plot/plotdoc.m
===================================================================
--- /issm/trunk/src/m/model/plot/plotdoc.m	(revision 6285)
+++ /issm/trunk/src/m/model/plot/plotdoc.m	(revision 6286)
@@ -50,4 +50,5 @@
 disp('                  - ''qmustddev'': plot of stddev distribution in sampling analysis with scaled response. needs option qmudata for descriptor');
 disp('                  - ''part_hist'': partitioning node and area histogram');
+disp('                  - ''quiver'': quiver plot. specify quiver fields. ''quiver_field'',{''vx'',''vy''} (default) or ''quiver_field'',{field1,field2}');
 
 disp('       ''alloptions'': apply the options to all subplots if ''on''');
@@ -125,4 +126,5 @@
 disp('       ''wrapping'': repeat ''n'' times the colormap (''n'' must be an integer)');
 disp('       ''unit'': by default, in m, otherwise, ''km'' is available');
+disp('       ''legend_position'': by default, ''NorthEasth''');
 disp('       ''qmudata'': data for qmu  plots.');
 disp('                  {dresp1   ,dresp2  ,hmin,hmax,hnint} or {samp,desc,mu,sigma,hmin,hmax,hnint}');
Index: /issm/trunk/src/m/model/plot/quiver_colorbar.m
===================================================================
--- /issm/trunk/src/m/model/plot/quiver_colorbar.m	(revision 6285)
+++ /issm/trunk/src/m/model/plot/quiver_colorbar.m	(revision 6286)
@@ -34,6 +34,6 @@
 	if exist(options,'colorbartitle'),
 		backup=gca;
-		axes(hcb);lab=ylabel(getfieldvalue(options,'colorbartitle'));
-		set(lab,'Rotation',getfieldvalue(options,'colorbartitlerotation',-90));
+		axes(hcb);lab=title(getfieldvalue(options,'colorbartitle'));
+		set(lab,'Rotation',getfieldvalue(options,'colorbartitlerotation',0));
 		set(lab,'VerticalAlignment','bottom');
 		axes(backup);
Index: /issm/trunk/src/m/model/radarpower.m
===================================================================
--- /issm/trunk/src/m/model/radarpower.m	(revision 6285)
+++ /issm/trunk/src/m/model/radarpower.m	(revision 6286)
@@ -21,12 +21,4 @@
 y0=min(ylim);
 y1=max(ylim);
-
-%Get path  to gdal binaries
-path_gdal=[ISSM_TIER '/externalpackages/gdal/install/bin/'];
-
-%Was gdal compiled? 
-if ~exist([path_gdal 'gdal_translate']),
-	error(['radarpower error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' ISSM_TIER '/externalpackages/gdal to use this routine.']);
-end
 
 %the geotiff image is either 200m or 1km accuracy. 
@@ -64,5 +56,5 @@
 	%Name of image
 	inputname='./temp.tif';
-	system([path_gdal 'gdal_translate -quiet -projwin ' num2str(x0) ' ' num2str(y1) ' ' num2str(x1) ' ' num2str(y0) ' ' geotiff_name ' ' inputname ]);
+	eval(['!gdal_translate -quiet -projwin ' num2str(x0) ' ' num2str(y1) ' ' num2str(x1) ' ' num2str(y0) ' ' geotiff_name ' ' inputname ]);
 
 	%Read in temp.tif:
