Implemented plotData.m