Graph legend.
legend(string1,string2,string3, ...)
puts a legend on the current plot
using the specified strings as labels. legend
works on line graphs
and histograms, etc.
legend(x,y,string1,string2,string3, ...)
puts a legend on the current plot
at position (x,y), otherwise it defaults to the top left-hand corner.
legend(x,y)
repositions an already defined legend.
legend(pos,string1,string2,string3, ...)
puts a legend on the current plot
with one of several predefined positions:
1 = Upper right-hand corner 2 = Upper left-hand corner (default) 3 = Lower left-hand corner 4 = Lower right-hand corner
legend(pos)
repositions an already defined legend.
Example:
w=gfx.Window() p1=w:plot({1,10},{1,10},'bo-') p2=w:plot({5,5},{5,3},'rx-') w:legend('blue line','red line'); w:legend(4)