[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These functions draw legend to the graph (useful for 1D plotting). Legend entry is a pair of strings: one for style of the line, another one with description text (with included TeX parsing). The arrays of strings may be used directly or by accumulating first to the internal arrays (by function addlegend) and further plotting it. The position of the legend can be selected automatic or manually (even out of bounding box). Parameters fnt and size specify the font style and size (see Font settings). Parameter llen set the relative width of the line sample and the text indent. If line style string for entry is empty then the corresponding text is printed without indent. Parameter fnt may contain:
See section Legend sample, for sample code and picture.
pos=3
'fnt'='#']mglGraph
: void
Legend (int
pos=0x3
, const char *
fnt="#"
, const char *
opt=""
)void
mgl_legend (HMGL
gr, int
pos, const char *
fnt, const char *
opt)Draws legend of accumulated legend entries by font fnt with 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). Parameter fnt can contain colors for face (1st one), for border (2nd one) and for text (last one). If less than 3 colors are specified then the color for border is black (for 2 and less colors), and the color for face is white (for 1 or none colors). If string fnt contain ‘#’ then border around the legend is drawn. If string fnt contain ‘-’ then legend entries will arranged horizontally.
x y
['fnt'='#']mglGraph
: void
Legend (mreal
x, mreal
y, const char *
fnt="#"
, const char *
opt=""
)void
mgl_legend_pos (HMGL
gr, mreal
x, mreal
y, const char *
fnt, const char *
opt)Draws legend of accumulated legend entries by font fnt with size. Position of legend is determined by parameter x, y which supposed to be normalized to interval [0,1].
mglGraph
: void
AddLegend (const char *
text, const char *
style)mglGraph
: void
AddLegend (const wchar_t *
text, const char *
style)void
mgl_add_legend (HMGL
gr, const char *
text, const char *
style)void
mgl_add_legendw (HMGL
gr, const wchar_t *
text, const char *
style)Adds string text to internal legend accumulator. The style of described line and mark is specified in string style (see Line styles).
mglGraph
: void
ClearLegend ()void
mgl_clear_legend (HMGL
gr)Clears saved legend strings.
val
mglGraph
: void
SetLegendMarks (int
num)void
mgl_set_legend_marks (HMGL
gr, int
num)Set the number of marks in the legend. By default 1 mark is used.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by Autobuild on September 28, 2013 using texi2html 1.82.