Graph plot script for history data