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

Class Axis

source code

Instance Methods [hide private]
 
__init__(orientation)
Creates a new axis.
source code
 
set_logarithmic(is_logarithmic)
Sets logarithmic mode.
source code
 
set_visible(is_visible)
Sets the visibility of an axis.
source code
 
is_visible()
Determines whether axis is set to be visible.
source code
 
is_logarithmic()
Determines whether axis is set to be locarithmic.
source code
 
get_orientation()
Gets the orientation of an axis.
source code
 
set_auto(is_auto)
Enables or disables automatic axis adjustmet.
source code
 
request_range(min, max)
Sets the requisition of axis boundaries.
source code
 
get_range(min, max)
Gets the actual boundaries of an axis.
source code
 
get_requested_range(min, max)
Gets the requested boundaries of an axis.
source code
 
get_magnification()
Returns: Magnification value of the axis
source code
 
get_magnification_string()
Gets the magnification string of an axis.
source code
 
set_label(label)
Sets the label text of an axis.
source code
 
get_label()
Gets the label of an axis.
source code
 
set_si_unit(unit)
Sets the axis unit.
source code
 
enable_label_edit(enable)
Enables/disables user to change axis label by clicking on axis widget.
source code
 
draw_on_drawable(drawable, gc, xmin, ymin, width, height)
Draws the x and y-axis on a drawable
source code
 
UNIMPLEMENTED_export_vector(xmin, ymin, width, height, fontsize)
Returns:
source code
 
get_major_ticks(nticks)
Gets the positions of major ticks of an axis.
source code
Method Details [hide private]

__init__(orientation)
(Constructor)

source code 

Creates a new axis.

Returns:
New axis as a GtkWidget.

set_logarithmic(is_logarithmic)

source code 

Sets logarithmic mode.

Parameters:
  • is_logarithmic - logarithmic mode (bool)

set_visible(is_visible)

source code 

Sets the visibility of an axis.

Parameters:
  • is_visible - visibility (bool)

is_visible()

source code 

Determines whether axis is set to be visible.

Return: True if axis is set to be visible.

is_logarithmic()

source code 

Determines whether axis is set to be locarithmic.

Returns:
True if axis is logarithmic.

get_orientation()

source code 

Gets the orientation of an axis.

Returns:
The orientation.

set_auto(is_auto)

source code 

Enables or disables automatic axis adjustmet.

Parameters:
  • is_auto - True to enable automatic tick size and distribution adjustment, False to disable it. (bool)

request_range(min, max)

source code 

Sets the requisition of axis boundaries.

The axis will adjust the boundaries to satisfy requisition but still have reasonable tick values and spacing. Use Axis.get_range() to obtain the boundaries the axis actually decided to use.

Parameters:
  • min - Minimum requisition (min boundary value). (float)
  • max - Maximum requisition (max boundary value). (float)

get_range(min, max)

source code 

Gets the actual boundaries of an axis.

Parameters:
  • min - Location to store actual axis minimum, or NULL. (float)
  • max - Location to store actual axis maximum, or NULL. (float)

get_requested_range(min, max)

source code 

Gets the requested boundaries of an axis.

Parameters:
  • min - Location to store requested axis minimum, or NULL. (float)
  • max - Location to store requested axis maximum, or NULL. (float)

get_magnification()

source code 
Returns:
Magnification value of the axis

get_magnification_string()

source code 

Gets the magnification string of an axis.

Returns:
Magnification string of the axis, owned by the axis.

set_label(label)

source code 

Sets the label text of an axis.

Parameters:
  • label - The new label text (it can be NULL for an empty label). (string)

get_label()

source code 

Gets the label of an axis.

Returns:
Axis label as a string owned by axis.

set_si_unit(unit)

source code 

Sets the axis unit. This will be added automatically to the label. unit is duplicated.

Parameters:

enable_label_edit(enable)

source code 

Enables/disables user to change axis label by clicking on axis widget.

Parameters:
  • enable - enable/disable user to change axis label (bool)

draw_on_drawable(drawable, gc, xmin, ymin, width, height)

source code 

Draws the x and y-axis on a drawable

Parameters:
  • drawable - Drawable to draw on. (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • xmin - The minimum x-axis value. (int)
  • ymin - The minimum y-axis value. (int)
  • width - The width of the x-axis. (int)
  • height - The height of the y-axis. (int)

UNIMPLEMENTED_export_vector(xmin, ymin, width, height, fontsize)

source code 
Parameters:
  • xmin - (int)
  • ymin - (int)
  • width - width of the x-axis (int)
  • height - hieght of the y-axis (int)
  • fontsize - (int)

get_major_ticks(nticks)

source code 

Gets the positions of major ticks of an axis.

Parameters:
  • nticks - Location to store the number of returned ticks. (int)
Returns:
The positions of axis major ticks (as real values, not pixels). The returned array is owned by the axis.