This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Legend


generates a legend with the specified boxes and text.

generates a legend by applying func to numbers between 0 and 1, incremented by the number of boxes .

labels the first and last boxes with mintext and maxtext respectively.
  • Possible forms for are color directives (e.g. Hue) or a graphic.
  • Possible forms for are strings, or strings with Style wrappers.
  • Function func should generate a color directive or graphic suitable for a in the legend.
  • The following options can be given:
LegendPosition{-1, -1}position of legend in relation to graphic
LegendSizeAutomaticlength of dimensions
LegendShadowAutomaticspecify shadow
LegendTextSpaceAutomaticspace in the legend box for text
LegendTextDirectionAutomaticdirection text is rotated, as in Text graphics primitive
LegendTextOffsetAutomaticoffset of text, as in Text graphics primitive
LegendLabelNonelabel for legend
LegendLabelSpaceAutomaticspecify space for LegendLabel
LegendOrientationVerticaldirection in which key boxes are laid out
LegendSpacingAutomaticspecify the amount of space around each key box
LegendBorderAutomaticstyle of border of key boxes and text
LegendBorderSpaceAutomaticspecify space around all boxes and text
LegendBackgroundAutomaticstyle of the background
Graphics primitives making up a legend:
Surface plot with a legend:
Needs["PlotLegends`"]
Graphics primitives making up a legend:
In[2]:=
Click for copyable input
Out[2]//InputForm=
In[3]:=
Click for copyable input
Out[3]=
Surface plot with a legend:
In[4]:=
Click for copyable input
Out[4]=