add checks for data size in scan plotting