How to export data and plots