Made read_existing_matrix_data general & added data saving in plot_matrix