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

gint x_to_i ( Plot plot,
gdouble  x 
) [inline]

Convert x-axis coordinate values to i values.

plot The plot.
x The coordinate value to be converted.
The i position (pixels) of the given data value.

Definition at line 100 of file util.c.

References _Plot::i_size, set_fac(), _Plot::x_axis, and _Plot::x_range.

Referenced by axis_calc_tick_sep(), axis_draw_x_text(), grid_draw(), and plot_line_set_points().

  gdouble i_fac;
  i_fac = set_fac(axis_transformation(plot->x_range[0], plot->x_axis),
                  axis_transformation(plot->x_range[1], plot->x_axis),
  return i_fac * (axis_transformation(x, plot->x_axis) -
                  axis_transformation(plot->x_range[0], plot->x_axis));

Generated by  Doxygen 1.6.0   Back to index