Update plot.c

changed double casts to float, as they should have been from the start