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


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:
Graphics primitives making up a legend:
Click for copyable input
Click for copyable input
Surface plot with a legend:
Click for copyable input