def update_dataset(position = 0, data: nil, **options)
      old_ds = @datasets[position]
      new_ds = old_ds.update(data, options)
      new_ds.equal?(old_ds) ? self : replace_dataset(position, new_ds)
    end
def update_dataset(position = 0, data: nil, **options)
      old_ds = @datasets[position]
      new_ds = old_ds.update(data, options)
      new_ds.equal?(old_ds) ? self : replace_dataset(position, new_ds)
    end
Create new Plot object where dataset at *position* will
 be replaced with the new one created from it by updating.

 @param position [Integer] position of dataset which you need to update
   (by default first dataset is updated)
 @param data [#to_gnuplot_points] data to update dataset with
 @param options [Hash] options to update dataset with, see Dataset top level doc

 @example
   updated_plot = plot.update_dataset(data: [x1,y1], title: 'After update')
   # plot IS NOT affected (if dataset did not store data in a file)