bugfix: order of subfunction in 'create_data()'. added functionality for saving a plot.