Fix index plotting for single index case. Made sure it works for multiple indices as well.