function plotprofiles(A,B,C,E,X,Y,D,a,dr,T,dt,events)
% usage: plotprofiles(A,B,C,E,X,Y,D,a,dr,T,dt,events)
% description: plots the data of an experimental run

% here we will do some time and distance profiles
radmax = max([norm([X,Y]-[A,C]),norm([X,Y]-[A,E]), ...
        norm([X,Y]-[B,C]),norm([X,Y]-[B,E])]);
radii = (0:dr:radmax)';
tstart = 0;
tend = T*dt;
timeranges = 4;
colors = 'kbgr';
timenodes = linspace(tstart,tend,timeranges+1);
figure
grid, hold on
title(strcat('Profiles at equally spaced time intervals and cumulative total (--)'));
xlabel('Radius');
ylabel('Event count')
for jj = 1:timeranges
  hst = RadialProfile(events,X,Y,radii,timenodes(jj),timenodes(jj+1));
  plot(radii,hst,strcat('-',colors(jj)));
end
% finally, do a plot of all events against r, all times
hst = RadialProfile(events,X,Y,radii,tstart,tend);
plot(radii,hst,'--');
