Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

plotErrorPatch.m 624 B

12345678910111213141516171819202122
  1. function [hLine, hErrorPatch] = plotErrorPatch(hAx, x, y, error, lineColor, patchColor, varargin)
  2. if nargin >= 7
  3. faceAlpha = varargin{1};
  4. else
  5. faceAlpha = 0.5;
  6. end
  7. x=x(:)';
  8. y=y(:)';
  9. error = error(:)';
  10. yUpper = y + error;
  11. yLower = y - error;
  12. yLower = yLower(end:-1:1); % Flip lower bound coordinates to use in pacth function.
  13. yPatch = [yUpper, yLower];
  14. xPatch = [x, x(end:-1:1)]; % Flip x coordinates to use in pacth function.
  15. hold(hAx, 'on');
  16. hErrorPatch = patch(hAx, xPatch, yPatch, patchColor, 'linestyle', 'none', 'FaceAlpha', faceAlpha);
  17. hLine = plot(hAx, x, y, 'color', lineColor);
  18. end