BAxisMarkers

BAxisMarkers — Object for managing axis markers.

Functions

Signals

void changed Run First

Types and Values

struct BTick
  BAxisMarkers

Object Hierarchy

    GObject
    ╰── BAxisMarkers

Description

This is used to control axis markers.

Functions

b_tick_position()

#define b_tick_position(x) ((x)->position)

Get the position of a tick

Parameters

x

a BTick

 

Returns

the position in plot coordinates


b_tick_type()

#define b_tick_type(x) ((x)->type)

Get the type of a tick

Parameters

x

a BTick

 

Returns

the type (major, minor, etc.)


b_tick_has_label_only()

#define b_tick_has_label_only(x) ((x)->type == B_TICK_NONE)

Get whether the tick shows a label but no line

Parameters

x

a BTick

 

Returns

TRUE or FALSE


b_tick_is_major()

#define             b_tick_is_major(x)

Get whether the tick is a major tick

Parameters

x

a BTick

 

Returns

TRUE or FALSE


b_tick_is_minor()

#define             b_tick_is_minor(x)

Get whether the tick is a minor tick

Parameters

x

a BTick

 

Returns

TRUE or FALSE


b_tick_is_micro()

#define             b_tick_is_micro(x)

Get whether the tick is a micro tick

Parameters

x

a BTick

 

Returns

TRUE or FALSE


b_tick_is_rule()

#define             b_tick_is_rule(x)

b_tick_label()

#define b_tick_label(x) ((x)->label)

Get the label

Parameters

x

a BTick

 

Returns

a string


b_tick_is_labelled()

#define b_tick_is_labelled(x) ((x)->label != NULL)

Get whether the tick has a label

Parameters

x

a BTick

 

Returns

TRUE or FALSE


b_axis_markers_new ()

BAxisMarkers *
b_axis_markers_new (void);

Create a BAxisMarkers object.

Returns

the new object


b_axis_markers_freeze ()

void
b_axis_markers_freeze (BAxisMarkers *am);

Increment the freeze count of am , preventing it from updating.

Parameters

am

a BAxisMarkers

 

b_axis_markers_thaw ()

void
b_axis_markers_thaw (BAxisMarkers *am);

Reduce the freeze count of am . When the freeze count reaches 0, am will respond to signals again.

Parameters

am

a BAxisMarkers

 

b_axis_markers_size ()

gint
b_axis_markers_size (BAxisMarkers *am);

Get the number of axis markers in am .

Parameters

am

a BAxisMarkers

 

Returns

the number of axis markers


b_axis_markers_get ()

const BTick *
b_axis_markers_get (BAxisMarkers *am,
                    gint i);

Get a tick from am .

Parameters

am

a BAxisMarkers

 

i

an integer

 

Returns

the tick


b_axis_markers_clear ()

void
b_axis_markers_clear (BAxisMarkers *am);

Clear all ticks from am .

Parameters

am

a BAxisMarkers

 

b_axis_markers_add ()

void
b_axis_markers_add (BAxisMarkers *am,
                    double pos,
                    gint type,
                    const gchar *label);

Add a tick to am .

Parameters

am

a BAxisMarkers

 

pos

the position, in plot coordinates

 

type

the type of tick to add

 

label

the label to show next to the tick

 

b_axis_markers_sort ()

void
b_axis_markers_sort (BAxisMarkers *am);

Sort the ticks in am by their position.

Parameters

am

a BAxisMarkers

 

b_axis_markers_populate_scalar ()

void
b_axis_markers_populate_scalar (BAxisMarkers *am,
                                double pos_min,
                                double pos_max,
                                gint goal,
                                gint radix,
                                gboolean percentage);

Automatically populate am with ticks, assuming that the view interval scales linearly.

Parameters

am

a BAxisMarkers

 

pos_min

the minimum position, in plot coordinates

 

pos_max

the maximum position, in plot coordinates

 

goal

the number of ticks desired

 

radix

??

 

percentage

whether to include a percent sign in the label

 

b_axis_markers_populate_scalar_log ()

void
b_axis_markers_populate_scalar_log (BAxisMarkers *am,
                                    double min,
                                    double max,
                                    gint goal,
                                    double base);

Automatically populate am with ticks, assuming that the view interval scales logarithmically.

Parameters

am

a BAxisMarkers

 

min

the minimum position, in plot coordinates

 

max

the maximum position, in plot coordinates

 

goal

the number of ticks desired

 

base

the base to use for the logarithm

 

b_axis_markers_populate_generic ()

void
b_axis_markers_populate_generic (BAxisMarkers *am,
                                 gint type,
                                 double min,
                                 double max);

Automatically populate am with ticks, using aesthetically pleasing defaults for the number of ticks.

Parameters

am

a BAxisMarkers

 

type

the axis type

 

min

the low edge of the view interval

 

max

the high edge of the view interval

 

Types and Values

struct BTick

struct BTick {
  double position;
  gint type;
  gchar *label;
  gboolean critical_label;
};

Abstract base class for cartesian views.

Members

double position;

the position of the tick along the axis

 

gint type;

the type of the tick (major, minor, etc.)

 

gchar *label;

the label to show next to the tick

 

gboolean critical_label;

whether the label must be shown at all costs

 

BAxisMarkers

typedef struct _BAxisMarkers BAxisMarkers;

Signal Details

The “changed” signal

void
user_function (BAxisMarkers *baxismarkers,
               gpointer      user_data)

Flags: Run First