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

gboolean axis_type_reset ( Plot plot  ) 

Sets the plot range based on values returned from the plot dialog.

Parameters:
plot The Plot whose range should be set.

Definition at line 1015 of file axis.c.

References AXIS_LINEAR, AXIS_LOG, _Axis::type, _Plot::x_axis, and _Plot::y_axis.

Referenced by axis_set_from_dialog().

{
  if ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio_xtype_linear))
       == TRUE) && (plot->x_axis->type == AXIS_LOG))
    plot->x_axis->type = AXIS_LINEAR;
  else if ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio_xtype_log))
           == TRUE) && (plot->x_axis->type == AXIS_LINEAR))
    plot->x_axis->type = AXIS_LOG;

  if ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio_ytype_linear))
      == TRUE) && (plot->y_axis->type == AXIS_LOG))
    plot->y_axis->type = AXIS_LINEAR;
  else if ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio_ytype_log))
           == TRUE) && (plot->y_axis->type == AXIS_LINEAR))
    plot->y_axis->type = AXIS_LOG;
  return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index