Append the string of one dataplot to legend
bool legend_append_plot( GraphLayer & gl, int nPlot, LPCSTR lpcszExtraFormat = NULL, LPCSTR lpcszSep = NULL )
return true on success, else return false
EX1
void legend_append_plot_ex1() { //make sure a active graph with two plots, and the legend only has the first plot GraphLayer gl = Project.ActiveLayer(); if ( gl ) { int nPlot = 1; if ( legend_append_plot(gl, nPlot, "@R") ) printf("Success!"); else printf("Fail!"); } }
The seperator string may not be "\r\n" as Iris said, default is "\r\n"
origin.h