How do I add PlotLegends in a MatrixPlot?

Hi,

I have a MatrixPlot and I 'd like join an Autimatic Legend.
I wrote this but il didn’t run.
Why?

Needs["PlotLegends`"]
MatrixPlot[%,ColorFunction->"TemperatureMap", ColorFunctionScaling->True,
FrameTicksStyle->Opacity[1],FrameTicks->All, PlotLegends->Automatic]

Thanks.

Margherita

Hi Margherita, Since version 9, Plotlegends is built in and no longer needs a package.

m = RandomInteger[{0, 9}, {3, 3}];

plot = MatrixPlot[m, ColorFunction -> "TemperatureMap", 
  ColorFunctionScaling -> True, FrameTicksStyle -> Opacity[1], 
  FrameTicks -> All, PlotLegends -> Automatic]

Hi,
thank you.
In my school we have version 8… :-(.
I 'll ask for the upgrading..

Kinds regards.

Margherita