MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with PlotLegends


Prior to v9 use ShowLegend

$Version

"8.0 for Mac OS X x86 (64-bit) (October 5, 2011)"

Needs["PlotLegends`"]

ShowLegend[
 DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3},
  ColorFunction -> "SunsetColors",
  ImageSize -> 400],
 {ColorData["SunsetColors"][1 - #1] &, 32, " 1", "-1",
  LegendPosition -> {1.1, -0.75},
  LegendShadow -> None,
  LegendSize -> {.2, 1.5}}]

In V9 the functionality is built-in

$Version

"9.0 for Mac OS X x86 (64-bit) (November 20, 2012)"

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


Bob Hanlon


On Fri, Dec 14, 2012 at 3:00 AM,  <xebamadeus at gmail.com> wrote:
> Hi! I need your help!!. I don't understand why not working PlotLegends when I use DensityPlot.
>
> This is my problem:
>
> Needs["PlotLegends`"]
>
> DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3},
>  ColorFunction -> "SunsetColors", PlotLegends -> Automatic]
>
> DensityPlot::optx: Unknown option PlotLegends in DensityPlot[Sin[x] Sin[y],{x,-4,4},{y,-3,3},ColorFunction->SunsetColors,PlotLegends->Automatic]. >>
>
> DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3},
>  ColorFunction -> "SunsetColors", PlotLegends -> Automatic]
>
> $Packages
>
> {"PlotLegends`", "ResourceLocator`", "DocumentationSearch`", \
> "GetFEKernelInit`", "JLink`", "PacletManager`", "WebServices`", \
> "System`", "Global`"}
>
> Thank you for you attention!
>



  • Prev by Date: Re: silly question on formatting tables
  • Next by Date: Re: Problem with PlotLegends
  • Previous by thread: Re: Problem with PlotLegends
  • Next by thread: Re: Problem with PlotLegends