CURVE_GRAPH
This widget displays a 2d graphical representation of the associated curve.
Notice that Plug'n Script cannot send custom curves from DSP to GUI (at least yet), so the only way to create curves is via FORMULA_CURVE or CURVE_FROM_PARAM_OVER_TIME.
Attributes brief detailed show all inherited
Examples
Simplest CURVE_GRAPH example can look like this:
- <WIDGET background_color="#EEEEF0">
- <!-- create a curve -->
- <FORMULA_CURVE id="formula_curve_demo" x_min="-3.14" x_max="3.14" x_default="0" y_default="0" y_max="1.2" y_min="-1.2" formula="sin(x)" />
- <!-- display a curve -->
- <CURVE_GRAPH curve_id="formula_curve_demo" width="500" height="200" color="#000000" graph_style="stroke" opacity="1" line_width="2" sample_rate="1" x_zoom="1" x_offset="0.5" />
- </WIDGET>

Let's try the same curve, but change graph_style to "bargraph" and x_response_curve to "log2".
- <CURVE_GRAPH curve_id="formula_curve_demo" width="500" height="200" opacity="1" line_width="2" sample_rate="1" x_zoom="1" x_offset="0.5" anti_alias="true" color="#333333" graph_style="bargraph" x_response_curve="log2" />

Another example with the same curve, changing only color, x_response_curve and x_positions_count.
- <CURVE_GRAPH curve_id="formula_curve_demo" width="500" height="200" opacity="1" line_width="4" sample_rate="1" x_zoom="1" x_offset="0.5" anti_alias="false" color="#0077CC" graph_style="bargraph" x_response_curve="exp3" x_positions_count="41" />

Nice looking example
Let's add a group box and another CURVE_GRAPH - one for the stroke, one for the semi-transparent fill.
- <FORMULA_CURVE id="formula_curve_demo" x_min="-3.14" x_max="3.14" x_default="0" y_default="0" y_max="1.2" y_min="-1.2" formula="sin(x)" />
- <PNS_LCD_GROUP_BOX>
- <!-- first graph for the line (stroke) -->
- <CURVE_GRAPH curve_id="formula_curve_demo" width="500" height="200" color="#327ca3" graph_style="stroke" opacity="1" line_width="4" />
- <!-- second line for the opaque bargraph -->
- <CURVE_GRAPH curve_id="formula_curve_demo" width="500" height="200" color="#327ca3" graph_style="bargraph" opacity="0.2" line_width="4" />
- </LAYER_STACK>
- </PNS_LCD_GROUP_BOX>

Related elements
Also see GRID, RULER, FORMULA_CURVE, CURVE_FROM_PARAM_OVER_TIME, XY_CURVES_GRAPH, CANVAS.
Comments
Please, authorize to view and post comments.