added autosave option in pyplot