HstHistogram2D

HstHistogram2D

Synopsis

#include <gtk-hst/histogram2d.h>


#define             HST_HISTOGRAM2D_CONST               (obj)
                    HstHistogram2D;
                    HstHistogram2DClass;
HstHistogram2D*     hst_histogram2d_new                 (int nx,
                                                         double xmin,
                                                         double xmax,
                                                         int ny,
                                                         double ymin,
                                                         double ymax,
                                                         gdouble *ptr);
void                hst_histogram2d_fill                (HstHistogram2D *h2d,
                                                         double x,
                                                         double y,
                                                         double w);
int                 hst_histogram2d_get_stats           (HstHistogram2D *h2d,
                                                         HstStats *s);
void                hst_histogram2d_reset               (HstHistogram2D *h2d);

Object Hierarchy

  GObject
   +----HstFunction
         +----HstFunction2D
               +----HstHistogram2D

Properties

  "ptr"                      gpointer              : Read / Write
  "vmax"                     gdouble               : Read
  "vmin"                     gdouble               : Read

Signals

  "changed"                                        : Run First

Description

Details

HST_HISTOGRAM2D_CONST()

#define HST_HISTOGRAM2D_CONST(obj)   G_TYPE_CHECK_INSTANCE_CAST((obj), HST_TYPE_HISTOGRAM2D, HstHistogram2D const)

obj :


HstHistogram2D

typedef struct _HstHistogram2D HstHistogram2D;


HstHistogram2DClass

typedef struct {
    HstFunction2DClass __parent__;

    void (*fill)(HstHistogram2D *, double x, double y, double w);
    void (*reset)(HstHistogram2D *);

    /* signals */
    void (*changed)(HstHistogram2D *);
} HstHistogram2DClass;


hst_histogram2d_new ()

HstHistogram2D*     hst_histogram2d_new                 (int nx,
                                                         double xmin,
                                                         double xmax,
                                                         int ny,
                                                         double ymin,
                                                         double ymax,
                                                         gdouble *ptr);

Creates a new HstHistogram2D

nx :

number of bins in X axis

xmin :

minimum value of X

xmax :

maximum value of Y

ny :

number of bins in Y axis

ymin :

minimum value of Y

ymax :

maximum value of Y

ptr :

a pointer where the data will be stored. If NULL, a new one will be created.

Returns :

a pointer to the new HstHistogram2D

hst_histogram2d_fill ()

void                hst_histogram2d_fill                (HstHistogram2D *h2d,
                                                         double x,
                                                         double y,
                                                         double w);

This function will increase the contents of the cell corresponding to x and y by w. It will emmit the ::changed signal

h2d :

a HstHistogram2D

x :

value of x

y :

value of y

w :

weight

hst_histogram2d_get_stats ()

int                 hst_histogram2d_get_stats           (HstHistogram2D *h2d,
                                                         HstStats *s);

Copies into s the contents of the hst stats

h2d :

a HstHistogram2D

s :

a pointer to a HstStats

Returns :

an integer

hst_histogram2d_reset ()

void                hst_histogram2d_reset               (HstHistogram2D *h2d);

Resets the contents of the histogram. It will emmit the ::changed signal

h2d :

a HstHistogram2D

Property Details

The "ptr" property

  "ptr"                      gpointer              : Read / Write

Pointer to data.


The "vmax" property

  "vmax"                     gdouble               : Read

Maximum value of Z.

Default value: 0


The "vmin" property

  "vmin"                     gdouble               : Read

Minimum value of Z.

Default value: 0

Signal Details

The "changed" signal

void                user_function                      (HstHistogram2D *hsthistogram2d,
                                                        gpointer        user_data)           : Run First

hsthistogram2d :

the object which received the signal.

user_data :

user data set when the signal handler was connected.