function [] = plot_strikes_peaks_coin(axn, winunique, midwinpoints, time, winlnums, winpeaksrmsnumt, winpeaksrmsfract, ptimesnum, strikepeakdt,datestring, stationstring)

global fntsize res xsize ysize lmarg bmarg widthv heightv xstr titlestr fstr pstr
axes(axn);
%[ax, h1, h2] = plotyy(time(midwinpoints),winlnums,time(midwinpoints),winpeaksrmsnumt,'plot','plot');
h1=semilogy(time(midwinpoints),winlnums);
%axes(ax(1));
%hold(ax(1));
hold on
h2=semilogy(time(midwinpoints),winpeaksrmsnumt);
if strcmp(winunique,'unique')
    h3 = plot(time(midwinpoints),ptimesnum(4,:));
%    h4 = plot(time(midwinpoints),ptimesnum(5,:));
%    h5 = plot(time(midwinpoints),ptimesnum(6,:));
else
    h3 = plot(time(midwinpoints),ptimesnum(1,:));
%    h4 = plot(time(midwinpoints),ptimesnum(2,:));
%    h5 = plot(time(midwinpoints),ptimesnum(3,:));
end
set(h1,'Marker','o', 'MarkerSize', 5, 'Color','b', 'LineStyle','-');
set(h3,'Marker','o', 'MarkerSize', 5, 'Color','r', 'LineStyle','-');
%set(h4,'Marker','o', 'MarkerSize', 5, 'Color',[0.5 0 0], 'LineStyle','-');
%set(h5,'Marker','o', 'MarkerSize', 5, 'Color',[0 1 1], 'LineStyle','-');
%ax(1).YLim = [0 ax(1).YLim(2)];
%ax(1).YTick=linspace(0,ax(1).YLim(2),5);


%set(ax(2),'YColor','k');
%xlim([datenum(spectraltime_axis(1)) datenum(spectraltime_axis(end))]);
%datetick(axn,'x','hh:00'); % commented September 23, 2018 for nature paper
xlabel('Universal Time (hh:mm)', 'fontsize', fntsize, 'fontname', 'helvetica'); % label the axes
%ylim([]);
ylabel('N Events per interval','fontsize', fntsize, 'fontname', 'helvetica');
%hold off
%axes(ax(2));
%hold(ax(2));
set(h2,'Marker','o', 'MarkerSize', 5, 'Color','k', 'LineStyle','-');
%set(ax(2),'YColor','k');
%ax(2).YLim = [0 ax(2).YLim(2)];
%ax(2).YTick=linspace(0,ax(2).YLim(2),5);
%xlabel('Universal Time (hh:mm)', 'fontsize', fntsize, 'fontname', 'helvetica'); % label the axes
%ylabel('N Events per interval','fontsize', fntsize, 'fontname', 'helvetica');
%legend([h1,h2,h3,h4,h5],'Lightning strikes','B Peaks',strcat(['Match for dt =',' ',num2str(strikepeakdt(2)),' s']),'+ve','-ve','Location','NorthEast','Orientation','vertical');
lgd=legend([h1,h2,h3],'Lightning strikes','B pulses',strcat(['Match for dt =',' ',num2str(strikepeakdt(2)),' s']),'Location','NorthEast','Orientation','vertical');
%title(strcat(datestring, stationstring,'\_','Strikes vs. Peaks vs. Match in Time'),'fontsize', fntsize, 'fontname', 'helvetica');
title('Lightning, pulses, and matched cases','fontsize', 24, 'fontname', 'helvetica');
grid on
% figure;
% plot(datenum(spectraltime_axis),winpeaksrmsfract,datenum(spectraltime_axis),winpeaksrmsnumt/winlnums,datenum(spectraltime_axis),ptimesnum/winlnums,datenum(spectraltime_axis),ptimesnum/winpeaksrmsnumt);
% xlim([datenum(spectraltime_axis(1)) datenum(spectraltime_axis(end))]);
% datetick('x','hh:00');
% xlabel('Universal Time (h)', 'fontsize', fntsize, 'fontname', 'helvetica'); % label the axes
% title('Fraction of matched peaks to all peaks above RMS noise','fontsize', fntsize, 'fontname', 'helvetica');
% legend('Threshold peaks/RMS Noise','Threshold peaks/strikes','Matched peaks/strikes','Matched peaks/Threshold Peaks');
end