Index: /issm/trunk/src/m/classes/public/plot/applyoptions.m
===================================================================
--- /issm/trunk/src/m/classes/public/plot/applyoptions.m	(revision 838)
+++ /issm/trunk/src/m/classes/public/plot/applyoptions.m	(revision 839)
@@ -155,5 +155,5 @@
 %latlon
 if (iscell(options_structure.latlon) | ~isnan(options_structure.latlon)),
-	latlonoverlay(options_structure.latlon,options_structure.latlonnumbering);
+	latlonoverlay(options_structure);
 end
 
Index: /issm/trunk/src/m/classes/public/plot/latlonoverlay.m
===================================================================
--- /issm/trunk/src/m/classes/public/plot/latlonoverlay.m	(revision 838)
+++ /issm/trunk/src/m/classes/public/plot/latlonoverlay.m	(revision 839)
@@ -1,3 +1,3 @@
-function latlonoverlay(latlon,numbering)
+function latlonoverlay(options_structure)
 %LATLONOVERLAY - overlay latitude and longitude lines on current figure
 %
@@ -8,5 +8,19 @@
 %
 %   Usage:
-%      latlonoverlay(latlon,numbering)
+%      latlonoverlay(options_structure)
+
+%get options
+latlon=options_structure.latlon;
+numbering=options_structure.latlonnumbering;
+if ~isnan(options_structure.latlonclick),
+	latlonclick=1;
+else
+	latlonclick=0;
+end
+if ~isnan(options_structure.fontsize),
+	fontsize=options_structure.fontsize;
+else
+	fontsize=16;
+end
 
 %recover arguments (set default parameters if needed)
@@ -84,9 +98,13 @@
 		l=line(x,y,'Color',color);
 		if numbering,
-			disp(['Specifiy where to put number for longitude ' num2str(lon(i))]);
-			[xcorner,ycorner]=ginput(1);
+			if latlonclick
+				disp(['Specifiy where to put number for longitude ' num2str(lon(i))]);
+				[xcorner,ycorner]=ginput(1);
 
-			%Find nearest point on this profile corresponding to (xcorner,ycorner):
-			ind=find_point(x,y,xcorner,ycorner); xcorner=x(ind); ycorner=y(ind);
+				%Find nearest point on this profile corresponding to (xcorner,ycorner):
+				ind=find_point(x,y,xcorner,ycorner); xcorner=x(ind); ycorner=y(ind);
+			else
+				ind=round(9*length(x)/10); xcorner=x(ind); ycorner=y(ind);
+			end
 			if length(x(1:ind))>10,
 				xcorner2=x(ind-10); ycorner2=y(ind-10);
@@ -97,5 +115,5 @@
 			
 			if (xcorner>xlimits(1) & xcorner<xlimits(2) & ycorner>ylimits(1) & ycorner<ylimits(2)),
-				th=text(xcorner,ycorner,[num2str(lon(i)) '^{\circ}']);set(th,'Color',colornumber,'Rotation',angle,'FontSize',16,'HorizontalAlignment','center','VerticalAlignment','middle');
+				th=text(xcorner,ycorner,[num2str(lon(i)) '^{\circ}']);set(th,'Color',colornumber,'Rotation',angle,'FontSize',fontsize,'HorizontalAlignment','center','VerticalAlignment','middle');
 				
 				%erase line and redraw it in two parts, to leave space for latitude number
@@ -123,9 +141,13 @@
 		
 		if numbering,
-			disp(['Specifiy where to put number for latitude ' num2str(lat(i))]);
-			[xcorner,ycorner]=ginput(1);
+			if latlonclick
+				disp(['Specifiy where to put number for latitude ' num2str(lat(i))]);
+				[xcorner,ycorner]=ginput(1);
 
-			%Find nearest point on this profile corresponding to (xcorner,ycorner):
-			ind=find_point(x,y,xcorner,ycorner); xcorner=x(ind); ycorner=y(ind);
+				%Find nearest point on this profile corresponding to (xcorner,ycorner):
+				ind=find_point(x,y,xcorner,ycorner); xcorner=x(ind); ycorner=y(ind);
+			else
+				ind=round(9*length(x)/10); xcorner=x(ind); ycorner=y(ind);
+			end
 			if length(x(1:ind))>10,
 				xcorner2=x(ind-10); ycorner2=y(ind-10);
@@ -136,5 +158,5 @@
 			
 			if (xcorner>xlimits(1) & xcorner<xlimits(2) & ycorner>ylimits(1) & ycorner<ylimits(2)),
-				th=text(xcorner,ycorner,[num2str(lat(i)) '^{\circ}']);set(th,'Color',colornumber,'Rotation',angle,'FontSize',16,'HorizontalAlignment','center','VerticalAlignment','middle');
+				th=text(xcorner,ycorner,[num2str(lat(i)) '^{\circ}']);set(th,'Color',colornumber,'Rotation',angle,'FontSize',fontsize,'HorizontalAlignment','center','VerticalAlignment','middle');
 				
 				%erase line and redraw it in two parts, to leave space for latitude number
Index: /issm/trunk/src/m/classes/public/plot/parse_options.m
===================================================================
--- /issm/trunk/src/m/classes/public/plot/parse_options.m	(revision 838)
+++ /issm/trunk/src/m/classes/public/plot/parse_options.m	(revision 839)
@@ -559,4 +559,16 @@
 end
 
+%latlonnumbering
+latlonclickvalues=findarg(optionstring,'latlonclick');
+if ~isempty(latlonclickvalues),
+	if  strcmpi(latlonclickvalues.value,'on'),
+		options_struct.latlonclick=1;
+	else
+		options_struct.latlonclick=NaN;
+	end
+else
+	options_struct.latlonclick=NaN;
+end
+
 %north arrow
 northarrowvalues=findarg(optionstring,'northarrow');
Index: /issm/trunk/src/m/classes/public/plot/plotdoc.m
===================================================================
--- /issm/trunk/src/m/classes/public/plot/plotdoc.m	(revision 838)
+++ /issm/trunk/src/m/classes/public/plot/plotdoc.m	(revision 839)
@@ -95,4 +95,5 @@
 disp('       ''latlon'': ''on'' or {latstep lonstep [resolution [color]]} where latstep,longstep and resolution are in degrees, color is a [r g b] array');
 disp('       ''latlonnumbering'': ''on'' or {latgap longap colornumber latangle lonangle} where latgap and longap are pixel gaps for the numbers,'); 
+disp('       ''latlonclick'': ''on'' to click on latlon ticks positions');
 disp('                   colornumber is a [r g b] array and latangle and lonangle are angles to flip the numbers');
 disp('       ''northarrow'': add an arrow pointing north, ''on'' for default value or [x0 y0 length [ratio [width]]] where (x0,y0) are the coordinates of the base, and ratio=headlength/length');
