fixed a small bug in plot.hpp