LibCapy - graphplotter

GraphPlotter class.

Macros:

Enumerations:

Type of correlation used in plot

Typedefs:

None.

Struct CapyGraphPlotterLegendData :

Struct CapyGraphPlotterLegendData's properties:

Title for the abciss

Title for the ordinate

Struct CapyGraphPlotterLegendData's methods:

None.

Struct CapyGraphPlotter :

Struct CapyGraphPlotter's properties:

Margin (in pixel, default 10)

Margin for the legend (in pixel, default 20). Space used beside the axii for axis name and values

Pen used to plot the data (default: default pen and blue color)

Pen used to draw axii and legend (default: default pen and black)

Flags for log base 10 scale

Struct CapyGraphPlotter's methods:

Destructor

Get the bounding box of the area containing data (without margin, axii, etc, ...) for a given image.

Input argument(s):

img: the image

Output and side effect(s):

Return the coordinates (in pixel) as a CapyRectangle.

Draw the legend of a graph

Input argument(s):

img: the image on which to draw

legend: data about the legend

Output and side effect(s):

The image is updated with the legend.

Plot the density distributions for one field from a CapyDataset.

Input argument(s):

dataset: the CapyDataset

iField: the index of the plotted field

dims: the dimension of the graph

nbBin: number of bins for the density distribution

Output and side effect(s):

Return a CapyImg. The ordinate corresponds to the bins from the min to the max value of the plotted field and the abciss corresponds to the number of records in the dataset for that bin.

Plot the density distributions for one categorical and one other field from a CapyDataset.

Input argument(s):

dataset: the CapyDataset

iCatField: the index of the categorical field for filtering

valCatField: the value of the categorical field for filtering

iField: the index of the plotted field

dims: the dimension of the graph

nbBin: number of bins for the density distribution

Output and side effect(s):

Return a CapyImg. The ordinate corresponds to the bins from the min to the max value of the plotted field and the abciss corresponds to the number of records in the dataset for that bin. Records are filtered on the value of the categorical field.

Plot the density distributions of all fields in a CapyDataset filtered per value of a given categorical field.

Input argument(s):

dataset: the CapyDataset

iCatField: the index of the categorical field

dims: the dimension of one graph

nbBin: number of bins for the density distribution

Output and side effect(s):

Return a CapyImg containing the result graphs. Each graph represent the combination of one value of the categorical field and one other field. Categorical field values are aligned top-down and other fields values are aligned left-right. In one plot, the ordinate corresponds to the bins from the min to the max value of the numerical value and the abciss corresponds to the number of record in the dataset for that bin.

Plot the records of a dataset on a 2D graph using the values of two given fields.

Input argument(s):

dataset: the CapyDataset

iField: the index of the field in abciss

jField: the index of the field in ordinate

dims: the dimension the graph

Output and side effect(s):

Return a CapyImg containing the result graph.

Plot the correlation graph between all pair of variables.

Input argument(s):

dataset: the CapyDataset

dims: the dimension of one graph

typeCorrelation: type of correlation

Output and side effect(s):

Return a CapyImg containing the result graphs. Each graph represent a pair of fields. Bottom left graphs contains a plot of records in the dataset.

Plot an histogram.

Input argument(s):

vals: values to plot

dims: dimension of the result image

legend: data for the legend

Output and side effect(s):

Return an image of the plot of the histogram

Functions:

Create a CapyGraphPlotter

Output and side effect(s):

Return a CapyGraphPlotter

Allocate memory for a new CapyGraphPlotter and create it

Output and side effect(s):

Return a CapyGraphPlotter

Exception(s):

May raise CapyExc_MallocFailed.

Free the memory used by a CapyGraphPlotter* and reset '*that' to NULL

Input argument(s):

that: a pointer to the CapyGraphPlotter to free