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.

xhairs.m 666 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. function h=xhairs(ax,s,x0,y0,top)
  2. % h=xhairs(ax,s,x0,y0)
  3. % ax is the axis to plot the axis in. default = gca
  4. % s is the style of th line. default = ':k'
  5. % x0, y0 are the x and y places to plot. default =[ 0,0];
  6. if nargin<3
  7. x0=0;
  8. y0=0;
  9. end
  10. if nargin<5
  11. top=false;
  12. end
  13. if nargin<2
  14. s=':k';
  15. end
  16. if nargin<1
  17. ax=gca;
  18. end
  19. bax=ax;
  20. for axx=1:numel(bax)
  21. ax=bax(axx);
  22. oldhold=get(ax,'NextPlot');
  23. xlim=get(ax, 'XLim');
  24. ylim=get(ax, 'YLim');
  25. hold(ax,'on')
  26. h(1)=plot(ax,[x0 x0],[ylim(1) ylim(2)],s);
  27. h(2)=plot(ax,[xlim(1) xlim(2)],[ y0 y0 ],s);
  28. if ~top
  29. ch=get(ax,'Children');
  30. set(ax,'Children',[ch(3:end); ch(1:2)])
  31. end
  32. set(ax,'NextPlot',oldhold);
  33. end