fixing plot.cpp