def update(data = nil, **options)
      if data && @type == :datablock
        new_datablock = @data.update(data)
        if new_datablock == @data
          update_options(options)
        else
          self.class.new(new_datablock, options)
        end
      else
        update_options(options)
      end
    end
def update(data = nil, **options)
      if data && @type == :datablock
        new_datablock = @data.update(data)
        if new_datablock == @data
          update_options(options)
        else
          self.class.new(new_datablock, options)
        end
      else
        update_options(options)
      end
    end
Create new dataset with updated data and merged options.

 Given data is appended to existing.
 Data is updated only if Dataset stores it in Datablock.
 Method does nothing if no options given and data isn't stored
 in in-memory Datablock.

 @param data [#to_gnuplot_points] data to append to existing
 @param options [Hash] new options to merge with existing options
 @return self if dataset corresponds to math formula or file
   (filename or temporary file if datablock)
 @return [Dataset] new dataset if data is stored in 'in-memory' Datablock
 @example Updating dataset with Math formula or filename given:
   dataset = Dataset.new('file.data')
   dataset.update(data: 'asd')
   #=> nothing updated
   dataset.update(data: 'asd', title: 'File')
   #=> Dataset.new('file.data', title: 'File')
 @example Updating dataset with data stored in Datablock (in-memory):
   in_memory_points = Dataset.new(points, title: 'Old one')
   in_memory_points.update(data: some_update, title: 'Updated')
   #=> Dataset.new(points + some_update, title: 'Updated')
 @example Updating dataset with data stored in Datablock (in-file):
   temp_file_points = Dataset.new(points, title: 'Old one', file: true)
   temp_file_points.update(data: some_update)
   #=> data updated but no new dataset created
   temp_file_points.update(data: some_update, title: 'Updated')
   #=> data updated and new dataset with title 'Updated' returned