\O3PO_Plotter

Collection of functions for visualization of data by means of relatively simple html.

Provides in particular a function to plot histograms.

Summary

Methods
Properties
Constants
histogram()
caption()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$caption_refs
$last_num
N/A

Properties

$caption_refs

$caption_refs : 

Array of tags of referencable captions.

Type

— Array of tags of referencable captions.

$last_num

$last_num : 

Array of the most recent referencable caption by caption type.

Type

— Array of the most recent referencable caption by caption type.

Methods

histogram()

histogram(array  $data, float  $x_delta, integer  $max_x_labels, integer  $max_y_labels, string  $max_width, string  $height, string  $x_label = null, string  $y_label = null, string  $color = "#000000", string  $caption = null, string  $ref = null) : string

Histogram

Display the provided data as a histogram.

Parameters

array $data

Array of data to be displayed as a histogram. Can be a dictionary, in which case the values will be interpreted as the data.

float $x_delta

The width of the bins (in x direction) of the histogram.

integer $max_x_labels

The maximum number of labels on the x axis.

integer $max_y_labels

The maximum number of labels on the y axis.

string $max_width

HTML length for the maximum width, below that takes 100% of the available space

string $height

HTML length for the height of the plot

string $x_label

The label of the x axis

string $y_label

The label of the y axis

string $color

The color of of the bars in HTML notation (defaults to '#000000').

string $caption

The caption of the plot (optional)

string $ref

The reference key of this plot

Returns

string —

The generated html code of the histogram

caption()

caption(  $type,   $text,   $ref = null) : string

Plot caption

Returns HTML code suitable for captions of plots produced with this class.

Parameters

$type
$text
$ref

Returns

string —

HTML code of the caption