Skip to content
Snippets Groups Projects
Commit ea0a7027 authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

add border for m_map

parent 0fe116bc
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,10 @@ function plot_map(hTsgGUI, hPlotAxes) ...@@ -25,6 +25,10 @@ function plot_map(hTsgGUI, hPlotAxes)
% ------------------------------- % -------------------------------
tsg = getappdata( hTsgGUI, 'tsg_data'); tsg = getappdata( hTsgGUI, 'tsg_data');
% Retrieve map border
% --------------------
border = str2double(tsg.preference.map_border_string(tsg.preference.map_border_value));
% Get the Geographic limit of the TSG time series % Get the Geographic limit of the TSG time series
% ----------------------------------------------- % -----------------------------------------------
dateLim = get(hPlotAxes(1), 'Xlim'); dateLim = get(hPlotAxes(1), 'Xlim');
...@@ -75,7 +79,7 @@ if ~isempty( ind ) ...@@ -75,7 +79,7 @@ if ~isempty( ind )
% Use of Mercator projection % Use of Mercator projection
% -------------------------- % --------------------------
m_proj('Mercator','lat',[latMin latMax],'long',[lonMin lonMax]); m_proj('Mercator','lat',[latMin-border latMax+border],'long',[lonMin-border lonMax+border]);
switch tsg.preference.map_resolution switch tsg.preference.map_resolution
......
...@@ -251,6 +251,34 @@ if bottom < .1 ...@@ -251,6 +251,34 @@ if bottom < .1
left = left + inc_x; left = left + inc_x;
end end
% display map border
% ------------------
uicontrol(...
'Parent', hPreferencesFig, ...
'Units', 'normalized', ...
'Style', 'Text', 'Fontsize', tsg.fontSize-1, ...
'HorizontalAlignment', 'left', 'Position',[left, bottom, length, height], ...
'TooltipString', 'select map border in degrees', ...
'String', 'Map Border');
% display map resolution uicontrol
% --------------------------------
uicontrol(...
'Parent', hPreferencesFig, ...
'Units', 'normalized', ...
'BackgroundColor', 'w', 'Style', 'popupmenu', 'Fontsize', tsg.fontSize-2, ...
'HorizontalAlignment', 'right', ...
'Position', [left + length, bottom, length, height], ...
'String', tsg.preference.map_border_string, ...
'Value', tsg.preference.map_border_value, ...
'Tag', 'PREFERENCES_MAP_BORDER');
bottom = bottom - inc_y - height;
if bottom < .1
bottom = 0.95;
left = left + inc_x;
end
% display QC Automatic Test TITLE % display QC Automatic Test TITLE
% -------------------------------- % --------------------------------
uicontrol(... uicontrol(...
...@@ -794,6 +822,8 @@ uiwait(hPreferencesFig); ...@@ -794,6 +822,8 @@ uiwait(hPreferencesFig);
get(prefs.PREFERENCES_PLOT_CONNECTED_LINE, 'value'); get(prefs.PREFERENCES_PLOT_CONNECTED_LINE, 'value');
tsg.preference.map_resolution = ... tsg.preference.map_resolution = ...
get(prefs.PREFERENCES_MAP_RESOLUTION, 'value'); get(prefs.PREFERENCES_MAP_RESOLUTION, 'value');
tsg.preference.map_border_value = ...
get(prefs.PREFERENCES_MAP_BORDER, 'value');
tsg.preference.positions_format_value = ... tsg.preference.positions_format_value = ...
get(prefs.PREFERENCES_POSITIONS_FORMAT, 'value'); get(prefs.PREFERENCES_POSITIONS_FORMAT, 'value');
% QC Tests % QC Tests
...@@ -841,7 +871,7 @@ uiwait(hPreferencesFig); ...@@ -841,7 +871,7 @@ uiwait(hPreferencesFig);
% flushes the event queue and updates the figure window % flushes the event queue and updates the figure window
% ----------------------------------------------------- % -----------------------------------------------------
drawnow; drawnow;
% refresh QC statistic panel % refresh QC statistic panel
% -------------------------- % --------------------------
......
...@@ -149,6 +149,8 @@ return ...@@ -149,6 +149,8 @@ return
% Plot % Plot
preference.map_resolution_string = {'low','medium','intermediate','high'}; preference.map_resolution_string = {'low','medium','intermediate','high'};
preference.map_resolution = 1; preference.map_resolution = 1;
preference.map_border_string = {'1','2','5','10','15'};
preference.map_border_value = 4;
preference.plot_connected_string = {'none', '-', '--', ':', '-.'}; preference.plot_connected_string = {'none', '-', '--', ':', '-.'};
preference.plot_connected_value = 1; % 0, line not connected preference.plot_connected_value = 1; % 0, line not connected
% QC test % QC test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment