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.

paired_plot.m 899 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. function [h,ax]=paired_plot(x,y,varargin)
  2. clr1='k';
  3. clr2='k';
  4. eclr1='k';
  5. eclr2='k';
  6. mark1='o';
  7. mark2='o';
  8. ax=[];
  9. xlabels={'Control' 'Exp'};
  10. y_lim=[];
  11. utils.overridedefaults(who,varargin);
  12. if isempty(ax)
  13. ax=gca;
  14. end
  15. num_p=numel(x);
  16. ax_stat=get(ax,'NextPlot');
  17. set(ax,'NextPlot','add');
  18. LL=[x(:) y(:) nan(size(y(:)))];
  19. XX=[ones(num_p,1) ones(num_p,1)+1 ones(num_p,1)+nan];
  20. LL=LL'; LL=LL(:);
  21. XX=XX'; XX=XX(:);
  22. hline=plot(ax,XX,LL,'k-');
  23. h1=plot(ax,ones(size(x)),x,'Marker',mark1,'Color',clr1,'MarkerFaceColor',clr1,'MarkerEdgeColor',eclr1,'LineStyle','none');
  24. h2=plot(ax,ones(size(x))*2,y,'Marker',mark2,'Color',clr2,'MarkerFaceColor',clr2,'MarkerEdgeColor',eclr2,'LineStyle','none');
  25. h=[h1 h2 hline];
  26. set(ax,'XLim',[0.5 2.5],'Box','Off','TickDir','out','TickLength',[0.025 0.1],'XTick',[1 2],'XTickLabel',xlabels)
  27. if ~isempty(y_lim)
  28. ylim(ax,y_lim);
  29. end
  30. set(ax,'NextPlot',ax_stat);