function  plot_by_ring(gap, data1,data2)
figure;
index = 8:0.2:11.8;
freq = [1:4];
for q = 1:length(freq)
    temp = squeeze(mean(data1,3));
    %tempSTD = std(temp);
    tempMAX = squeeze(max(data1,[],3));
    tempMIN = squeeze(min(data1,[],3));
    subplot(length(freq),1,q);
    plot(1:gap:size(data1,2),temp(freq(q),1:gap:size(data1,2)),'r','LineWidth',1.5);
    hold on;
    plot(1:gap:size(data1,2),tempMAX(freq(q),1:gap:size(data1,2)),'--r','LineWidth',1);
    plot(1:gap:size(data1,2),tempMIN(freq(q),1:gap:size(data1,2)),'--r','LineWidth',1);
    temp2 = squeeze(mean(data2,3));
    tempSTD = std(temp2);
    tempMAX = squeeze(max(data2,[],3));
    tempMIN = squeeze(min(data2,[],3));
    plot(1:gap:size(data2,2),temp2(freq(q),1:gap:size(data2,2)),'k','LineWidth',2);
    plot(1:gap:size(data2,2),tempMAX(freq(q),1:gap:size(data2,2)),'--k','LineWidth',1);
    plot(1:gap:size(data2,2),tempMIN(freq(q),1:gap:size(data2,2)),'--k','LineWidth',1);
    %legend('Normal', 'Block9Hz');
    hold off
    title(index(freq(q)));
    %ylim([0.2 0.5]);
end
figure;
index = 8:0.2:11.8;
freq = [5:12];
for q = 1:length(freq)
    temp = squeeze(mean(data1,3));
    tempSTD = std(temp);
    tempMAX = squeeze(max(data1,[],3));
    tempMIN = squeeze(min(data1,[],3));
    subplot(length(freq),1,q);
    plot(1:gap:size(data1,2),temp(freq(q),1:gap:size(data1,2)),'r','LineWidth',2);
    hold on;
    plot(1:gap:size(data1,2),tempMAX(freq(q),1:gap:size(data1,2)),'--r','LineWidth',1);
    plot(1:gap:size(data1,2),tempMIN(freq(q),1:gap:size(data1,2)),'--r','LineWidth',1);
    temp2 = squeeze(mean(data2,3));
    tempSTD = std(temp2);
    tempMAX = squeeze(max(data2,[],3));
    tempMIN = squeeze(min(data2,[],3));
    plot(1:gap:size(data2,2),temp2(freq(q),1:gap:size(data2,2)),'k','LineWidth',2);
    plot(1:gap:size(data2,2),tempMAX(freq(q),1:gap:size(data2,2)),'--k','LineWidth',1);
    plot(1:gap:size(data2,2),tempMIN(freq(q),1:gap:size(data2,2)),'--k','LineWidth',1);
    %legend('Normal', 'Block9Hz');
    hold off
    title(index(freq(q)));
    %ylim([0.2 0.5]);
end
figure;
index = 8:0.2:11.8;
freq = [13:20];
for q = 1:length(freq)
    temp = squeeze(mean(data1,3));
    tempSTD = std(temp);
    tempMAX = squeeze(max(data1,[],3));
    tempMIN = squeeze(min(data1,[],3));
    subplot(length(freq),1,q);
    plot(1:gap:size(data1,2),temp(freq(q),1:gap:size(data1,2)),'r','LineWidth',2);
    hold on;
    plot(1:gap:size(data1,2),tempMAX(freq(q),1:gap:size(data1,2)),'--r','LineWidth',1);
    plot(1:gap:size(data1,2),tempMIN(freq(q),1:gap:size(data1,2)),'--r','LineWidth',1);
    temp2 = squeeze(mean(data2,3));
    tempSTD = std(temp2);
    tempMAX = squeeze(max(data2,[],3));
    tempMIN = squeeze(min(data2,[],3));
    plot(1:gap:size(data2,2),temp2(freq(q),1:gap:size(data2,2)),'k','LineWidth',2);
    plot(1:gap:size(data2,2),tempMAX(freq(q),1:gap:size(data2,2)),'--k','LineWidth',1);
    plot(1:gap:size(data2,2),tempMIN(freq(q),1:gap:size(data2,2)),'--k','LineWidth',1);
    %legend('Normal', 'Block9Hz');
    hold off
    title(index(freq(q)));
end


end

