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

Class Graph

source code

Instance Methods [hide private]
 
__init__(gmodel)
Creates graph widget based on information in model.
source code
 
get_axis(type)
Gets a graph axis.
source code
 
set_axis_visible(type, is_visible)
Sets the visibility of graph axis of given orientation.
source code
 
get_area()
Gets the area widget of a graph.
source code
 
set_model(gmodel)
Changes the model a graph displays.
source code
 
get_model()
Gets the model of a graph.
source code
 
set_status(status)
Sets the status of a graph widget.
source code
 
get_status()
Get the status of a graph widget.
source code
 
enable_user_input(enable)
Enables/disables all the graph/curve settings dialogs to be invoked by mouse clicks.
source code
 
export_pixmap(export_title, export_axis, export_labels)
Renders a graph widget into a pixbuf.
source code
 
export_postscript(export_title, export_axis, export_labels)
Approximately renders a graph widget in PostScript.
source code
 
window_new()
Creates a new window showing graph.
source code
Method Details [hide private]

__init__(gmodel)
(Constructor)

source code 

Creates graph widget based on information in model.

Parameters:
Returns:
new graph widget. (gtk.Widget)

get_axis(type)

source code 

Gets a graph axis.

Parameters:
  • type - Axis orientation (GtkPositionType)
Returns:
The axis (of given orientation) within the graph widget. (Axis)

set_axis_visible(type, is_visible)

source code 

Sets the visibility of graph axis of given orientation. Visibility can be set also directly using Axis API.

Parameters:
  • type - Axis orientation (GtkPositionType)
  • is_visible - set/unset axis visibility within graph widget (bool)

get_area()

source code 

Gets the area widget of a graph.

Returns:
The graph area widget within the graph. (gtk.Widget)

set_model(gmodel)

source code 

Changes the model a graph displays.

Everything in graph widgets will be reset to reflect the new data.

Parameters:

get_model()

source code 

Gets the model of a graph.

Returns:
The graph model this graph widget displays. (GraphModel)

set_status(status)

source code 

Sets the status of a graph widget.

The status determines how the graph reacts on mouse events. This includes point or area selection and zooming.

Parameters:
  • status - graph status Expected values: GRAPH_STATUS_PLAIN, GRAPH_STATUS_XSEL, GRAPH_STATUS_YSEL, GRAPH_STATUS_POINTS, GRAPH_STATUS_ZOOM, GRAPH_STATUS_XLINES, GRAPH_STATUS_YLINES. (GraphStatusType)

get_status()

source code 

Get the status of a graph widget.

See Graph.set_status() for more.

Returns:
The current graph status. (GraphStatusType)

enable_user_input(enable)

source code 

Enables/disables all the graph/curve settings dialogs to be invoked by mouse clicks.

Parameters:
  • enable - whether to enable user input (bool)

export_pixmap(export_title, export_axis, export_labels)

source code 

Renders a graph widget into a pixbuf.

Parameters:
  • export_title - True to export graph title. Currently unimplemented. (bool)
  • export_axis - True to export graph axes. Currently unimplemented. (bool)
  • export_labels - True to export graph labels. Currently unimplemented. (bool)
Returns:
A newly created pixbuf. (gdk.Pixbuf)

export_postscript(export_title, export_axis, export_labels)

source code 

Approximately renders a graph widget in PostScript.

Parameters:
  • export_title - True to export graph title. Currently unimplemented. (bool)
  • export_axis - True to export graph axes. Currently unimplemented. (bool)
  • export_labels - True to export graph labels. Currently unimplemented. (bool)
Returns:
Tuple consisting of 2 values (value, str). ((string), (SkipArg))

window_new()

source code 

Creates a new window showing graph.

Returns:
A newly created graph window as GtkWidget. (gtk.Widget)