From 08813cfb58bade7e1e6f9516cbda8c9e5b38f0ae Mon Sep 17 00:00:00 2001 From: Jacques Grelet <jacques.grelet@ird.fr> Date: Thu, 5 Jul 2018 15:06:32 +0000 Subject: [PATCH] remove axes( hAxes(PlotNum) from loop comment axes and use it as first parameter of line line(hPlotAxes(i), ... add test scripts for climato --- tsgqc.m | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tsgqc.m b/tsgqc.m index ad8e9ab..1d3c29e 100644 --- a/tsgqc.m +++ b/tsgqc.m @@ -2773,8 +2773,9 @@ end % -------------------------------------------------- if strcmp( get(hMapFig, 'Visible'), 'on') - % Select the map axes - % ------------------- + % Select the map axes, we cannot use mline as line with an axes + % in first parameter like: m_line(hPlotAxes(4), ....) + % ------------------------------------------------------------ axes( hPlotAxes(4)); % Look for a MARKER (Red point) on the ship track @@ -2787,7 +2788,7 @@ end % Plot a Marker (Red point) on the ship track % ------------------------------------------- - hMarker = m_line( mod(tsg.LONX(indCursor(1)) + ... + hMarker = m_line(mod(tsg.LONX(indCursor(1)) + ... tsg.lonplus, tsg.lonmod) - tsg.lonplus,... tsg.LATX(indCursor(1)),... 'Marker', 'o', 'MarkerSize', 5, ... @@ -2806,7 +2807,7 @@ end % Delete the Marker and redraw it % ------------------------------- delete( h); - hMarker = m_line( ... + hMarker = m_line(... tsg.LONX(indCursor), tsg.LATX(indCursor),... 'Marker', 'o', 'MarkerSize', 5, ... 'Color', 'r', 'MarkerFaceColor', 'r'); @@ -4163,9 +4164,10 @@ end % loop over 3 subplot and draw vertical lines % ------------------------------------------- for iplot = 1:3 - axes( hPlotAxes(iplot)); + % axes( hPlotAxes(iplot)); limy = get(hPlotAxes(iplot), 'YLim'); - line([x x], limy, 'color', 'k', 'tag', 'VERTICAL_TAG_LINE'); + line(hPlotAxes(iplot), [x x], limy,... + 'color', 'k', 'tag', 'VERTICAL_TAG_LINE'); % to immediately display changes to object data, call % the drawnow function instead of setting EraseMode to 'xor'. -- GitLab