adding code for scatterplot for devices and contention period