Module gwy :: Class GraphArea
[hide private]
[frames] | no frames]

Class GraphArea

source code

Instance Methods [hide private]
 
__init__()
Creates a new graph area widget.
source code
 
get_label()
Gets the label inside a graph area.
source code
 
set_model(gmodel)
Sets the graph model of a graph area.
source code
 
get_model()
Gets the model of a graph area.
source code
 
get_cursor(x_cursor, y_cursor)
Gets mouse cursor related values within a graph area.
source code
 
set_x_range(x_min, x_max)
Sets the horizontal range a graph area displays.
source code
 
set_y_range(y_min, y_max)
Sets the vertical range a graph area displays.
source code
 
set_x_grid_data(ndata, grid_data)
Sets the grid data on the x-axis of a graph area
source code
 
set_y_grid_data(ndata, grid_data)
Sets the grid data on the y-axis of a graph area
source code
 
get_x_grid_data(ndata)
Gets the grid data on the x-axis of a graph area.
source code
 
get_y_grid_data(ndata)
Gets the grid data on the y-axis of a graph area.
source code
 
get_selection(status_type)
Gets the selection object corresponding to a status of a graph area.
source code
 
set_status(status_type)
Sets the status of a graph area.
source code
 
get_status()
Gets the status of a grap area.
source code
 
draw_on_drawable(drawable, gc, x, y, width, height)
Draws a graph area to a Gdk drawable.
source code
 
UNIMPLEMENTED_export_vector(x, y, width, height)
Creates PostScript representation of a graph area.
source code
 
enable_user_input(enable)
Enables/disables all user input dialogs (invoked by clicking the mouse).
source code
 
edit_curve(id)
Invokes the curve property dialog for a curve.
source code
Method Details [hide private]

__init__()
(Constructor)

source code 

Creates a new graph area widget.

Returns:
Newly created graph area as GtkWidget.

get_label()

source code 

Gets the label inside a graph area.

Returns:
The graph label widget within the graph area.

set_model(gmodel)

source code 

Sets the graph model of a graph area.

Parameters:

get_model()

source code 

Gets the model of a graph area.

Returns:
The graph model this graph area widget displays.

get_cursor(x_cursor, y_cursor)

source code 

Gets mouse cursor related values within a graph area.

Parameters:
  • x_cursor - Location to store the x value corresponding to cursor position. (float)
  • y_cursor - Location to store the y value corresponding to cursor position. (float)

set_x_range(x_min, x_max)

source code 

Sets the horizontal range a graph area displays.

Parameters:
  • x_min - The minimum x value, in real coodrinates. (float)
  • x_max - The maximum x value, in real coodrinates. (float)

set_y_range(y_min, y_max)

source code 

Sets the vertical range a graph area displays.

Parameters:
  • y_min - The minimum y value, in real coodrinates. (float)
  • y_max - The maximum y value, in real coodrinates. (float)

set_x_grid_data(ndata, grid_data)

source code 

Sets the grid data on the x-axis of a graph area

Parameters:
  • ndata - The number of points in grid_data. (int)
  • grid_data - Array of grid line positions on the x-axis (in real values, not pixels). (const-gdouble*)

set_y_grid_data(ndata, grid_data)

source code 

Sets the grid data on the y-axis of a graph area

Parameters:
  • grid_data - Array of grid line positions on the y-axis (in real values, not pixels). (const-gdouble*)

get_x_grid_data(ndata)

source code 

Gets the grid data on the x-axis of a graph area.

Parameters:
  • ndata - Location to store the number of returned positions. (int)
Returns:
Array of grid line positions (in real values, not pixels) owned by the graph area.

get_y_grid_data(ndata)

source code 

Gets the grid data on the y-axis of a graph area.

Parameters:
  • ndata - Location to store the number of returned positions. (int)
Returns:
Array of grid line positions (in real values, not pixels) owned by the graph area.

get_selection(status_type)

source code 

Gets the selection object corresponding to a status of a graph area.

A selection object exists even for inactive status types (selection modes), therefore also selections for other modes than the currently active one can be requested.

Parameters:
  • status_type - Graph status. Value GRAPH_STATUS_PLAIN mode (which has no selection associated) stands for the currentl selection mode. (GraphStatusType)
Returns:
The requested selection. It is NULL only if status_type is GRAPH_STATUS_PLAIN and the current selection mode is GRAPH_STATUS_PLAIN.

set_status(status_type)

source code 

Sets the status of a graph area.

When the area is inside a Graph, use Graph.set_status() instead (also see this function for details).

Parameters:
  • status_type - New graph area status. (GraphStatusType)

get_status()

source code 

Gets the status of a grap area.

See Graph.area_set_status().

Returns:
The current graph area status.

draw_on_drawable(drawable, gc, x, y, width, height)

source code 

Draws a graph area to a Gdk drawable.

Parameters:
  • drawable - a GdkDrawable (destination for graphics operations) (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • x - X position in drawable where the graph area should be drawn (int)
  • y - Y position in drawable where the graph area should be drawn (int)
  • width - width of the graph area on the drawable (int)
  • height - height of the graph area on the drawable (int)

UNIMPLEMENTED_export_vector(x, y, width, height)

source code 

Creates PostScript representation of a graph area.

Parameters:
  • x - (int)
  • y - (int)
  • width - (int)
  • height - (int)
Returns:
A fragment of PostScript code representing the the graph area as a newly allocated GString.

enable_user_input(enable)

source code 

Enables/disables all user input dialogs (invoked by clicking the mouse).

Parameters:
  • enable - True to enable user interaction, False to disable it. (bool)

edit_curve(id)

source code 

Invokes the curve property dialog for a curve.

If the dialog is already displayed, it is switched to the requested curve.

Since: 2.5

Parameters:
  • id - The index of the curve to edit properties of. (int)