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

void plot_axes_create ( Plot plot  ) 

Create both x and y axes for a plot window.

Parameters:
plot The Plot for which the axes are to be created.

Definition at line 717 of file axis.c.

References axis_create(), axis_free(), AXIS_LINEAR, _Axis::type, X_AXIS, _Plot::x_axis, Y_AXIS, and _Plot::y_axis.

Referenced by axis_set_from_dialog(), axis_toggle_log_state(), plot_area_zoom_finish(), plot_data_append(), plot_data_init(), and plot_window_reconfigure().

{
  AXIS_TYPE x_type = AXIS_LINEAR;
  AXIS_TYPE y_type = AXIS_LINEAR;

  if (plot->x_axis != NULL)
    {
      x_type = plot->x_axis->type;
      axis_free(plot->x_axis);
    }

  if (plot->y_axis != NULL)
    {
      y_type = plot->y_axis->type;
      axis_free(plot->y_axis);
    }

  plot->x_axis = axis_create(plot, X_AXIS, x_type);
  plot->y_axis = axis_create(plot, Y_AXIS, y_type);
}


Generated by  Doxygen 1.6.0   Back to index