diff --git a/tsg_util/plot_map.m b/tsg_util/plot_map.m index 918c9c6c5c72019e5d6603983a54d132cf6e3c32..23ffbce132213695d8aca73f741b6dfb97b712aa 100644 --- a/tsg_util/plot_map.m +++ b/tsg_util/plot_map.m @@ -25,6 +25,10 @@ function plot_map(hTsgGUI, hPlotAxes) % ------------------------------- 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 % ----------------------------------------------- dateLim = get(hPlotAxes(1), 'Xlim'); @@ -75,7 +79,7 @@ if ~isempty( ind ) % 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 diff --git a/tsg_util/preferencesForm.m b/tsg_util/preferencesForm.m index fa75cabfae1e3e63b3a3d5c451ed3f35acbe5b04..a75d00b0f52e4fed79c2d05e5164c2ed0197c638 100644 --- a/tsg_util/preferencesForm.m +++ b/tsg_util/preferencesForm.m @@ -251,6 +251,34 @@ if bottom < .1 left = left + inc_x; 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 % -------------------------------- uicontrol(... @@ -794,6 +822,8 @@ uiwait(hPreferencesFig); get(prefs.PREFERENCES_PLOT_CONNECTED_LINE, 'value'); tsg.preference.map_resolution = ... get(prefs.PREFERENCES_MAP_RESOLUTION, 'value'); + tsg.preference.map_border_value = ... + get(prefs.PREFERENCES_MAP_BORDER, 'value'); tsg.preference.positions_format_value = ... get(prefs.PREFERENCES_POSITIONS_FORMAT, 'value'); % QC Tests @@ -841,7 +871,7 @@ uiwait(hPreferencesFig); % flushes the event queue and updates the figure window % ----------------------------------------------------- - drawnow; + drawnow; % refresh QC statistic panel % -------------------------- diff --git a/tsg_util/tsg_preferences.m b/tsg_util/tsg_preferences.m index 3257d8489ab40dc1e0b5fdd023d56f892408123c..a8db667ad6adc3527d684683dd1bb8c9176a4f6a 100644 --- a/tsg_util/tsg_preferences.m +++ b/tsg_util/tsg_preferences.m @@ -149,6 +149,8 @@ return % Plot preference.map_resolution_string = {'low','medium','intermediate','high'}; 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_value = 1; % 0, line not connected % QC test