moved plot building to each sensors function