add plotSaveAsPicture function in source