code for plotting variation of retransmissions with device count