GOffice.GraphAxis

g GObject.GInterface GObject.GInterface GOffice.GraphDataset GOffice.GraphDataset GObject.GInterface->GOffice.GraphDataset GOffice.Persist GOffice.Persist GObject.GInterface->GOffice.Persist GOffice.StyledObject GOffice.StyledObject GObject.GInterface->GOffice.StyledObject GObject.Object GObject.Object GOffice.GraphObject GOffice.GraphObject GObject.Object->GOffice.GraphObject GOffice.GraphAxis GOffice.GraphAxis GOffice.GraphAxisBase GOffice.GraphAxisBase GOffice.GraphAxisBase->GOffice.GraphAxis GOffice.GraphDataset->GOffice.GraphAxis GOffice.GraphStyledObject GOffice.GraphStyledObject GOffice.GraphObject->GOffice.GraphStyledObject GOffice.GraphStyledObject->GOffice.GraphAxisBase GOffice.Persist->GOffice.GraphAxis GOffice.StyledObject->GOffice.GraphStyledObject

Subclasses:

None

Methods

Inherited:

GOffice.GraphAxisBase (7), GOffice.GraphObject (40), GObject.Object (37), GOffice.StyledObject (8), GOffice.GraphDataset (7), GOffice.Persist (2)

Structs:

GObject.ObjectClass (5)

class

set_from_str (str)

add_contributor (contrib)

bound_changed (contrib)

clear_contributors ()

contributors ()

data_get_bounds (data, minimum, maximum)

del_contributor (contrib)

get_atype ()

get_bounds ()

get_circular_rotation ()

get_color_map ()

get_color_scale ()

get_date_conv ()

get_effective_format ()

get_effective_span (start, end)

get_entry (i, user_defined)

get_format ()

get_grid_line (major)

get_labels (plot_that_labeled_axis)

get_major_ticks_distance ()

get_metrics ()

get_polar_perimeter ()

get_polar_unit ()

get_ref_axis ()

get_ticks (ticks)

is_center_on_ticks ()

is_discrete ()

is_inverted ()

is_zero_important ()

set_bounds (minimum, maximum)

set_extents (start, stop)

set_format (fmt)

set_polar_unit (unit)

Virtual Methods

Inherited:

GOffice.GraphStyledObject (2), GOffice.GraphObject (18), GObject.Object (7)

Properties

Inherited:

GOffice.GraphAxisBase (11), GOffice.GraphObject (8)

Name

Type

Flags

Short Description

assigned-format-string-XL

str

r/w

The user assigned format to use for non-discrete axis labels (XL format)

axis-ref

str

r/w

The name of the axis used as reference for ticks distance

circular-rotation

float

r/w

Rotation of circular axis

color-map-name

str

r/w

The name of the color map

display-factor

float

r/w

Real values are the displayed ones multipled by the display factor.

invert-axis

bool

r/w

Scale from high to low rather than low to high

map-name

str

r/w

The name of the map for scaling

metrics

str

r/w

The way the axis ticks distance is evaluated

metrics-ratio

float

r/w

If an axis is used as reference, gives the ratio of the ticks distance, and if the metrix is absolute, the ticks distance. Defaults to 1.0

metrics-unit

str

r/w

The unit symbol for the absolute distance unit between ticks. Might be “cm” or “in”

polar-unit

str

r/w

Polar axis set unit

span-end

float

r/w

Position of the plot area at which the axis effective area ends, expressed as a percentage of the available position. Defaults to 1.0

span-start

float

r/w

Position of the plot area at which the axis effective area starts, expressed as a percentage of the available position. Defaults to 0.0

type

int

r/w

Numerical type of this axis

Signals

Inherited:

GOffice.GraphStyledObject (1), GOffice.GraphObject (7), GObject.Object (1)

Fields

Inherited:

GOffice.GraphStyledObject (1), GOffice.GraphObject (7), GObject.Object (1)

Class Details

class GOffice.GraphAxis(**kwargs)
Bases:

GOffice.GraphAxisBase, GOffice.GraphDataset, GOffice.Persist

Abstract:

No

classmethod set_from_str(str)
Parameters:

str (str) –

Return type:

GOffice.GraphAxisSet

add_contributor(contrib)
Parameters:

contrib (GOffice.GraphObject) – GOffice.GraphObject (can we relax this to use an interface ?)

Register contrib as taking part in the negotiation of self's bounds.

bound_changed(contrib)
Parameters:

contrib (GOffice.GraphObject) – GOffice.GraphObject

clear_contributors()
contributors()
Returns:

the list of the axis contributors

Return type:

[GOffice.GraphObject]

data_get_bounds(data, minimum, maximum)
Parameters:
del_contributor(contrib)
Parameters:

contrib (GOffice.GraphObject) – GOffice.GraphObject (can we relax this to use an interface ?)

contrib no longer takes part in the negotiation of self's bounds.

get_atype()
Return type:

GOffice.GraphAxisType

get_bounds()
Returns:

True if the bounds stored in minima and maxima are sane

minima:

storage for result

maxima:

storage for result

Return type:

(bool, minima: float, maxima: float)

get_circular_rotation()
Returns:

rotation of a circular GOffice.GraphAxis.

Return type:

float

get_color_map()
Returns:

the color map used by the axis if any.

Return type:

GOffice.GraphAxisColorMap

Retrieves the GOffice.GraphAxisColorMap associated to the axis or None.

get_color_scale()
Returns:

the color scale used to display the axis colors for color and pseudo-3d axes.

Return type:

GOffice.GraphColorScale

Retrieves the GOffice.GraphColorScale associated to the axis or None.

get_date_conv()
Return type:

GOffice.DateConventions

get_effective_format()
Returns:

the GOffice.Format used for the axis labels. Differs from GOffice.GraphAxis.get_format in that it never returns a general format (see GOffice.Format.is_general).

Return type:

GOffice.Format

get_effective_span(start, end)
Parameters:
get_entry(i, user_defined)
Parameters:
Returns:

the GOffice.value of axis element i and sets user_defined or NaN on error

Return type:

float

get_format()
Returns:

the format assigned to self.

Return type:

GOffice.Format

get_grid_line(major)
Parameters:

major (bool) – whether to retrieve major or minor grid line.

Returns:

a pointer to GridLine object associated to given axis, None if it doesn’t exists.

Return type:

GOffice.GraphGridLine

get_labels(plot_that_labeled_axis)
Parameters:

plot_that_labeled_axis (GOffice.GraphPlot) – a GOffice.GraphPlot

Returns:

the possibly None GOffice.Data used as a label for this axis along with the plot that it was associated with

Return type:

GOffice.Data

get_major_ticks_distance()
Return type:

float

get_metrics()
Return type:

GOffice.GraphAxisMetrics

get_polar_perimeter()
Return type:

float

get_polar_unit()
Returns:

unit of self if it’s a circular axis of a polar axis set, -1 otherwise.

Return type:

GOffice.GraphAxisPolarUnit

get_ref_axis()
Returns:

the axis used to evaluate the length of self or None.

Return type:

GOffice.GraphAxis

New in version 0.10.17.

get_ticks(ticks)
Parameters:

ticks (GOffice.GraphAxisTick) – an array of GOffice.GraphAxisTick

Returns:

number of ticks

Return type:

int

An accessor to self->ticks.

is_center_on_ticks()
Returns:

True if labels are centered on ticks when self is discrete

Return type:

bool

is_discrete()
Returns:

True if self enumerates a set of discrete items, rather than a continuous GOffice.value

Return type:

bool

is_inverted()
Returns:

True if self is inverted.

Return type:

bool

is_zero_important()
Return type:

bool

set_bounds(minimum, maximum)
Parameters:
  • minimum (float) – axis low bound

  • maximum (float) – axis high bound

Sets axis bounds. If minimum or maximum are not finite values, corresponding bound remains unchanged.

set_extents(start, stop)
Parameters:
  • start (float) – axis start bound

  • stop (float) – axis stop bound

Set axis exents. It’s a convenience function that sets axis bounds taking into account invert flag.

set_format(fmt)
Parameters:

fmt (GOffice.Format or None) – GOffice.Format

Returns:

True if things changed

Return type:

bool

set_polar_unit(unit)
Parameters:

unit (GOffice.GraphAxisPolarUnit) – GOffice.GraphAxisPolarUnit

Sets unit of a circular axis. See GOffice.GraphAxisPolarUnit for valid values.

Property Details

GOffice.GraphAxis.props.assigned_format_string_XL
Name:

assigned-format-string-XL

Type:

str

Default Value:

'General'

Flags:

READABLE, WRITABLE

The user assigned format to use for non-discrete axis labels (XL format)

GOffice.GraphAxis.props.axis_ref
Name:

axis-ref

Type:

str

Default Value:

'none'

Flags:

READABLE, WRITABLE

The name of the axis used as reference for ticks distance

GOffice.GraphAxis.props.circular_rotation
Name:

circular-rotation

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

Rotation of circular axis

GOffice.GraphAxis.props.color_map_name
Name:

color-map-name

Type:

str

Default Value:

'default'

Flags:

READABLE, WRITABLE

The name of the color map

GOffice.GraphAxis.props.display_factor
Name:

display-factor

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

Real values are the displayed ones multipled by the display factor.

GOffice.GraphAxis.props.invert_axis
Name:

invert-axis

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Scale from high to low rather than low to high

GOffice.GraphAxis.props.map_name
Name:

map-name

Type:

str

Default Value:

'Linear'

Flags:

READABLE, WRITABLE

The name of the map for scaling

GOffice.GraphAxis.props.metrics
Name:

metrics

Type:

str

Default Value:

'default'

Flags:

READABLE, WRITABLE

The way the axis ticks distance is evaluated

GOffice.GraphAxis.props.metrics_ratio
Name:

metrics-ratio

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

If an axis is used as reference, gives the ratio of the ticks distance, and if the metrix is absolute, the ticks distance. Defaults to 1.0

GOffice.GraphAxis.props.metrics_unit
Name:

metrics-unit

Type:

str

Default Value:

'cm'

Flags:

READABLE, WRITABLE

The unit symbol for the absolute distance unit between ticks. Might be “cm” or “in”

GOffice.GraphAxis.props.polar_unit
Name:

polar-unit

Type:

str

Default Value:

'Degrees'

Flags:

READABLE, WRITABLE

Polar axis set unit

GOffice.GraphAxis.props.span_end
Name:

span-end

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

Position of the plot area at which the axis effective area ends, expressed as a percentage of the available position. Defaults to 1.0

GOffice.GraphAxis.props.span_start
Name:

span-start

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

Position of the plot area at which the axis effective area starts, expressed as a percentage of the available position. Defaults to 0.0

GOffice.GraphAxis.props.type
Name:

type

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

Numerical type of this axis