Module gwy :: Class GraphCurveModel
[show private | hide private]
[frames | no frames]

Class GraphCurveModel


GraphCurveModel The ::data-changed signal is emitted whenever curve data is set with a function like Graph.curve_model_set_data().

('gwygraphcurvemodel', ' The #GwyGraphCurveModel which received the signal. ')
Method Summary
  __init__()
Creates a new graph curve model.
  get_ndata()
Return number of data points within the curve data
  get_ranges(x_logscale, y_logscale, x_min, x_max, y_min, y_max)
  get_x_range(x_min, x_max)
Gets the abscissa range of a graph curve.
  get_xdata()
Gets pointer to x data points.
  get_y_range(y_min, y_max)
Gets the ordinate range of a graph curve.
  get_ydata()
Gets pointer to y data points.
  new_alike()
Creates new graph curve model object that has the same settings as gcmodel.
  set_data(xdata, ydata, n)
Sets curve model data.
  set_data_from_dataline(dline, from_index, to_index)
Sets the curve data from DataLine.

Method Details

__init__()
(Constructor)

Creates a new graph curve model.
Returns:
New empty graph curve model as a GObject.

get_ndata()

Returns:
number of data points within the curve data

get_x_range(x_min, x_max)

Gets the abscissa range of a graph curve.

The values are cached in the curve model therefore repeated calls to this function (with unchanged data) are cheap.

If there are no data points in the curve, x_min and x_max are untouched and the function returns False.

See also Graph.curve_model_get_ranges() for a more high-level function.
Parameters:
x_min - Location to store the minimum abscissa value, or NULL. (float)
x_max - Location to store the maximum abscissa value, or NULL. (float)
Returns:
True if there are any data points in the curve and x_min, x_max were set.

get_xdata()

Gets pointer to x data points.

Data are used within the graph and cannot be freed.
Returns:
X data points, owned by the curve model.

get_y_range(y_min, y_max)

Gets the ordinate range of a graph curve.

The values are cached in the curve model therefore repeated calls to this function (with unchanged data) are cheap.

If there are no data points in the curve, x_min and x_max are untouched and the function returns False.

See also Graph.curve_model_get_ranges() for a more high-level function.
Parameters:
y_min - Location to store the minimum ordinate value, or NULL. (float)
y_max - Location to store the maximum ordinate value, or NULL. (float)
Returns:
True if there are any data points in the curve and x_min, x_max were set.

get_ydata()

Gets pointer to y data points.

Data are used within the graph and cannot be freed.
Returns:
Y data points, owned by the curve model.

new_alike()

Creates new graph curve model object that has the same settings as gcmodel.

Curve data are not duplicated.
Returns:
New graph curve model.

set_data(xdata, ydata, n)

Sets curve model data.
Parameters:
xdata - X data points (array of size n). (const-gdouble*)
ydata - Y data points (array of size n). (const-gdouble*)
n - Number of points, i.e. items in xdata and ydata. (int)

set_data_from_dataline(dline, from_index, to_index)

Sets the curve data from DataLine. The range of import can be modified using parameters from_index and to_index that are interpreted directly as data indices within the DataLine. In the case that from_index == to_index, the full DataLine is used.
Parameters:
dline - A DataLine (DataLine)
from_index - index where to start (int)
to_index - where to stop (int)

Generated by Epydoc 2.1 on Tue Dec 30 04:01:42 2008 http://epydoc.sf.net