fix plot.cpp