GRID
This widget displays a 2D grid (usually for a graph) using the provided parameter information (positions count, default value etc.). It is typically used as a background for one or several CURVE_GRAPH objects.
Attributes brief detailed show all inherited
Since this element references the metadata for two parameters (one for each axis), all attributes are prefixed by 'x_' and 'y_', for each axis.
Examples
- <ROW width="500" height="250" spacing="10">
- <!-- Y-Ruler -->
- <RULER id="ruler_y" orientation="vertical" width="35" height="200" param_info_id="formula_curve_1.y_info" color="#AAAAAA" value_format=".1" content="{value}" positions_count="5" v_offset="-20" h_offset="0" />
- <COLUMN width="450" height="200" spacing="10">
- <LAYER_STACK width="100%" height="100%">
- <!-- Create a formula curve -->
- <FORMULA_CURVE id="formula_curve_1" x_default="0" x_max="7" x_min="-7" y_default="0" y_max="1" y_min="-1" formula="sin(x)" />
- <!-- Grid -->
- <GRID id="grid_1" width="100%" height="100%" x_positions_count="15" y_positions_count="3" x_subdiv_count="0" y_subdiv_count="1" y_origin_color="#BBBBBB" subdiv_color="#BBBBBB" x_param_info_id="formula_curve_1.x_info" y_param_info_id="formula_curve_1.y_info" x_offset="0.5" origin_line_width="2" origin_color="#DD0000" />
- <!-- Curve graph -->
- <CURVE_GRAPH id="curve_graph_1" curve_id="formula_curve_1" width="100%" height="100%" anti_alias="true" color="#0066FF" line_width="1" sample_rate="5" x_offset="0.5" />
- </LAYER_STACK>
- <!-- X-Ruler -->
- <RULER id="ruler_x" orientation="horizontal" width="100%" value_suffix="false" param_info_id="formula_curve_1.x_info" color="#AAAAAA" value_format=".0" content="{value}" positions_count="15" font_escapement="90" text_h_align="right" v_offset="0" h_offset="-9" v_align="center" offset="0.5" />
- </COLUMN>
- </ROW>
- <PARAM_TEXT_CONTROL param_id="grid_1.x_zoom" content="x_zoom: {value}" />
- <PARAM_LINK from="grid_1.x_zoom" to="ruler_x.zoom" />
- <PARAM_LINK from="grid_1.x_zoom" to="curve_graph_1.x_zoom" />
Grid can be also used with a single coordinate
- <PARAM id="freqs" min="0" max="10" default="5" />
- <GRID width="300" height="30"
- x_param_info_id="freqs.info" x_positions_count="11" x_subdiv_count="1" subdiv_color="#CCCCCC" origin_line_width="2" subdiv_line_width="0.5" origin_color="#DD0000" />
- <RULER orientation="horizontal" width="300" param_info_id="freqs.info" color="#AAAAAA" value_format=".1" content="{value}" positions_count="11" font_escapement="90" text_h_align="right" v_offset="0" h_offset="-10" v_align="center" font_size="12" />