private void plot_xycounts_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
{
for (int i = last_start; i <= last_end; i++)
{
if (events[i].hDevice != mlog.hDevice)
continue;
double x = events[i].ts + delay;
double y = events[i].lastx;
update_minmax(x, y);
main_comp.Add(x, y);
}
for (int i = last_start; i <= last_end; i++)
{
if (events[i].hDevice != mlog.hDevice)
continue;
double x = events[i].ts + delay;
double y = events[i].lasty;
update_minmax(x, y);
sec_comp.Add(x, y);
}
}