<< CL_g_delete Utilities CL_g_select >>

CelestLab >> Utilities > CL_g_legend

CL_g_legend

Defines a legend adequately positioned with optional title

Calling Sequence

[hl] = CL_g_legend(a, str [,pos, header, new_axes])

Description

Parameters

a:

Handle of the axes entity. Default = current axes (gca()).

str:

Strings used for the legend (1xN or Nx1: as many as there are 'Polyline' entities in 'a').

pos:

(optional) Position of the legend: [x,y], where x: (normalized coordinates) distance from the left, y: (normalized coordinate) distance from the top. Default is [0.75, 0.2].

header:

(optional) Title of the legend.

new_axes:

(optional) %t if the legend must be created in a new axes entity. Default is %t if 'header' is defined, else it is %f.

hl:

Handle of the legend entity created.

Authors

Examples

f=scf();
a=gca();
x = 0:0.1:5;
y = x;
plot(x, y);
plot(x, 2*y, '-r');
CL_g_legend(a, str=["plot 1", "plot 2"]);
<< CL_g_delete Utilities CL_g_select >>