# curve_update

## Description

find the input curve layer and plot the result curve

## Syntax

bool curve_update( curvebase & cuvResult, const curvebase & cuvInput, const TreeNode & trInput, int nColor, bool bRescale = false )


## Parameters

cuvResult
[input] Curve to plot
cuvInput
[input] reference Curve to find where to plot the cuvResult
trInput
[input] if given, this will provide the graph layer location to plot cuvResult
nColor
[input] color of the cuvResult curve
bRescale
[input] rescale layer or not

## Return

TRUE if correct layer is found and cuvResult is plotted successfully

## Examples

EX1

//This example shows how to plot the data of column C to the same graph layer as the data of column B in red.
//For this sample codes to run, current window must worksheet and have column B and C
//in the current project and a Graph with the data of column B plotted exists too.

void curve_update_ex1()
{
Worksheet wks = Project.ActiveLayer();
if(wks)
{
Curve crvPlotted(wks, 1);
Curve crvToBePlot(wks, 2);
TreeNode trInput;
int nColor = SYSCOLOR_RED;
if(crvPlotted && crvToBePlot)
{
curve_update(crvToBePlot, crvPlotted, trInput, nColor);
}
}
}
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.18728460371494293, "perplexity": 21233.10868666639}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296945168.36/warc/CC-MAIN-20230323132026-20230323162026-00044.warc.gz"}