Message Boards Message Boards

0
|
9282 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

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

2 Replies

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

Kinds regards.

Margherita

Posted 9 years ago

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]

enter image description here

POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract