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.

makecolormap.m 401 B

1234567891011121314151617181920
  1. function C = makecolormap(colors,varargin)
  2. if nargin==1
  3. spacing = ones(size(colors,1)-1,1);
  4. else
  5. spacing = varargin{1};
  6. end
  7. nsteps = 100/sum(spacing);
  8. C = nan(100,3);
  9. endind=0;
  10. for sx = 1:numel(spacing)
  11. startind = endind+1;
  12. endind = nsteps*spacing(sx)+startind-1;
  13. for cx = 1:3
  14. C(startind:endind,cx) = linspace(colors(sx,cx),colors(sx+1,cx),nsteps*spacing(sx));
  15. end
  16. end