WLJS LogoWLJS Notebook

BarLegend

Represents bar-type legend

BarLegend[cf_ColorFunction | cf_String]
BarLegend[{cf_, {min, max}}]

where cf is a color function (named or provided explicitly)

Examples

Named colors

BarLegend[{"Rainbow", {0,1}}]

Using Hue

BarLegend[{Hue, {0, 1}}]

Implicit usage

Automatically generated and wrapped into Legended

ContourPlot[Sin[x y], {x, 0, \[Pi]}, {y, 0, \[Pi]}, Contours -> 5, PlotLegends -> Automatic]

On this page