fixed exporting figures in display function to allow external file naming