dh_Graph
dh_Graph:
A simple graph to display data. The graph will be drawn with a dark background, and gray grid lines.
Properties:
data_points: A table containing points to be displayed on the graph. The points will be displayed with blue dots and will be connected with straight blue lines.
ref_points: An optional table containing points to be displayed on the graph. If not empty and not nil, the points will be displayed with red dots and will be connected with straight red lines. These will be drawn first and overlaid with data_points.
grid_x_divs: The number of horizontal divisions.
grid_y_divs: The number of vertical divisions.
y_min: The value at the bottom of the graph.
y_max: The value at the top of the graph.
y_ref: The vertical position where to draw a horizontal reference line. The line will be drawn a light gray. If no reference line is desired then set to nil.
x_labels: A table containing a list of position, value pairs for labels to be displayed at the bottom of the graph.
Example:
{{1,"100"}, {5,"1Khz"}, {10,"10Khz"}}. Each item in the table contains the position and the value to be displayed. The position is an integer corresponding to a horizontal division. The value is a string so anything alpha-numerical is valid. The position is counted from left to right.
y_labels: A table containing a list of position, value pairs for labels to be displayed at the left of the graph.
Example:
{{2,"+6"}, {4,"0"}, {6,"-6"}}. Each item in the table contains the position and the value to be displayed. The position is an integer corresponding to a vertical division. The value is a string so anything alpha-numerical is valid. The position is counted from top to bottom.
font_text: The font for the labels.
pad: Distance of label from edge of graph.
--------------------------------------------------------
attribute:           property_name       default value       
--------------------------------------------------------
data points:         data_points         {}
reference points:    ref_points          {}
vertical divisions:  grid_x_divs         10
horiz. divisions:    grid_y_divs          8
minimum value        y_min              -12
maximum value        y_max               12
horz. ref. line      y_ref                0
horizontal labels:   x_labels            {}
vertical labels:     y_labels            {}

labels font:         font_text          "sans16"
labels padding:      pad                 4

caption:             caption             ""
caption font:        font_caption       "sans22"
caption position:    cap_pos            "top"
caption offset x:    cap_pad_x           4
caption offset y:    cap_pad_y           4
caption centered:    cap_centered        false
shadow caption:      shadow_caption      false

shadow:              shadow              false

frame outline:       frame_use_outline   false
frame thickness:     frame_thk           2
allow sel.outline:   allow_sel_outline   false

-- colors --
graph background:    col_bg             "black"   
frame:               col_frame          "elm_frame" 
labels text:         col_text           "silver"   
caption text:        col_cap_text       "txt"     
backdrop:            col_backdrop       "wnd_bg"
            
--------------------------------------------------------