Update plot.cpp