manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.8 Legend (MGL)

These commands draw legend to the graph (useful for 1D plotting (MGL)). Legend entry is a pair of strings: one for style of the line, another one with description text (with included LaTeX parsing). The array of string are accumulated first to the internal arrays (by command addlegend) and are plotted later. The position of the legend can be selected automatic or manually. Parameters fnt and size specify the font style and size. Parameter llen set the relative width of the line sample and the text indent (default value is 0.1). If line style string for entry is empty then the corresponding text is printed without indent. If string contains ‘A’ then legend coordinates set position in the picture. See section Legend sample, for sample code and picture.

MGL command: legend [pos=3 'fnt'='rL' size=-1 llen=0.1]

Draws legend of accumulated legend entries by font fnt with specified size. Parameter pos sets the position of the legend: ‘0’ is bottom left corner, ‘1’ is bottom right corner, ‘2’ is top left corner, ‘3’ is top right corner (is default).

MGL command: legend x y ['fnt'='rL' size=-1 llen=0.1]

Draws legend of accumulated legend entries by font fnt with size. Position of legend in the current subplot is determined by parameter x, y which supposed to be normalized to interval [0,1].

MGL command: addlegend 'text' 'stl'

Adds string text to internal legend accumulator. The style of described line and mark is specified in string stl (see section Line styles). Maximal number of entries is 100.

MGL command: clearlegend

Clears saved legend strings.

MGL command: legendbox val

Switches on/off the drawing of a box near legend. By default, the box is drawn.

MGL command: legendmarks val

Set the number of marks in the legend. By default 1 mark is used.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.