legend_combine

 

Description

Combine legends of all layers and show on one layer

Syntax

bool legend_combine( GraphPage & gp, int nLayerHasLegend = 0, bool bAscending = true, bPlotAscending = true )

Parameters

gp
[input]The graph page to combine legend
nLayerHasLegend
[input] to decide put the only legend to which layer.
bAscending
[input] control the order of legends according to GraphLayer order
bPlotAscending
[input] control the plot order of legends according to plot order within GraphLayer

Return

If success then true else false

Examples

EX1

//For this example to run, make sure the active window is a graph page with at least one layer
//and the first layer must exist at least one dataplot in it
void  legend_combine_ex1()
{
    GraphPage gp = Project.Pages(-1); // get active graph page
    legend_combine(gp, 0); // combine legends from all layers to the first layer
}

Remark

See Also

Header to Include

origin.h

Reference