added lineshape plotting: updates with index