Logo Search packages:      
Sourcecode: ygraph version File versions  Download package

void plot_data_append ( Plot plot,
gint  data_set_idx 

Append a dataset to the data already contained in a plot (eg. after loading a new data set from a file).

plot The Plot where data is being appended.
data_set_idx The index of the appended DataSet within the global_data_set_list.

Definition at line 472 of file plot_window.c.

References _Plot::current_frame, current_frame_calc(), _Plot::data, ij_dimensions_set(), _Plot::legend, legend_create(), plot_axes_create(), _Plot::plot_data, plot_get_data_index(), plot_line_create(), plot_range_set(), plot_window_set_title(), and _Legend::rebuild.

Referenced by file_select_read(), and file_subtract().

  gint current_frame;


  if (plot->data == NULL)
    plot->data = g_array_new(FALSE, FALSE, sizeof(gint));

  g_array_append_val(plot->data, data_set_idx);

  plot->legend->rebuild = TRUE;
   * Determine the new axis ranges in both xy and ij coordinates.
  plot_range_set(plot, APPEND_DATA);

   * Re-calculate the ij data from the xy data for all datasets, since
   * a new range may have been defined.
  if (plot->plot_data != NULL)
    g_array_free(plot->plot_data, TRUE);

  plot->plot_data = plot_line_create(plot);

  current_frame = current_frame_calc(plot_get_data_index(plot, data_set_idx));
  g_array_append_val(plot->current_frame, current_frame);


Generated by  Doxygen 1.6.0   Back to index