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

Class Axis


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

Method Details

__init__(orientation)
(Constructor)

Creates a new axis.
Returns:
New axis as a GtkWidget.

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

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)

enable_label_edit(enable)

Enables/disables user to change axis label by clicking on axis widget.
Parameters:
enable - enable/disable user to change axis label (bool)

get_label()

Gets the label of an axis.
Returns:
Axis label as a string owned by axis.

get_magnification()

Returns:
Magnification value of the axis

get_magnification_string()

Gets the magnification string of an axis.
Returns:
Magnification string of the axis, owned by the axis.

get_major_ticks(nticks)

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.

get_orientation()

Gets the orientation of an axis.
Returns:
The orientation.

get_range(min, max)

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)

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)

is_logarithmic()

Determines whether axis is set to be locarithmic.
Returns:
True if axis is logarithmic.

is_visible()

Determines whether axis is set to be visible.

Return: True if axis is set to be visible.

request_range(min, max)

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)

set_auto(is_auto)

Enables or disables automatic axis adjustmet.
Parameters:
is_auto - True to enable automatic tick size and distribution adjustment, False to disable it. (bool)

set_label(label)

Sets the label text of an axis.
Parameters:
label - The new label text (it can be NULL for an empty label). (string)

set_logarithmic(is_logarithmic)

Sets logarithmic mode.
Parameters:
is_logarithmic - logarithmic mode (bool)

set_si_unit(unit)

Sets the axis unit. This will be added automatically to the label. unit is duplicated.
Parameters:
unit - axis unit (SIUnit)

set_visible(is_visible)

Sets the visibility of an axis.
Parameters:
is_visible - visibility (bool)

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

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

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