I will like to get a density plot (in Mathematica 8) as in: Make legend same height as plot.
However, anytime I run

DensityPlot[ Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotLegends -> Automatic]

I get a red coloured "PlotLegends" within the input text followed by an error message. I need your help!

  • $\begingroup$ you need Mathematica 9. $\endgroup$ Aug 26, 2013 at 16:33
  • $\begingroup$ As Rolf said, you need Mathematica 9 to use those functions. For v8, you can use Jens' solution in the linked question. See also this post by Jens for creating good looking legends in v8 and below. $\endgroup$
    – rm -rf
    Aug 28, 2013 at 23:06
  • $\begingroup$ @Rolf and R.M., I now have Mathematica 9 and enjoying the autocruise. Thanks. $\endgroup$
    – Dean
    Feb 26, 2017 at 15:26


Browse other questions tagged or ask your own question.