in view history, create getHist to show table and plot, plot has bad code