added saving time range and legend showing on plot
added saving selected visible plots on exit