MathGroup Archive 2005

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

Search the Archive

Re: ListDensityPlot Legend?


Hi Juergen
Please try the following code.
<< Graphics`Legend`
t = Table[Random[Integer, 2], {5}, {5}];
ShowLegend[ListDensityPlot[t, ColorFunction -> (
      Hue[#/3] &), DisplayFunction -> Identity], {Hue[#/3] &, 3, " 2", "0",
     LegendPosition -> {1.1, -.3}}]
yehuda

On 7/12/05, juejung <juejung at indiana.edu> wrote:
> dear mathgroup,
> 
> how does one add a legend to a ListDensityPlot.
> i've a matrix that contains only 0,1 or 2 entries. ListDensityPlot plots
> the regions in three different colors. i would like to add a legend that
> indicates the colors and their corresponding numbers (0,1, or 2).
> Tom Wickham-Jones' ExtendGraphics package is doing almost what i want for
> ListContourPlot, however, for ListDensityPlot it's not working.
> Any ideas?
> 
> thanks
> juergen
> 
>


  • Prev by Date: Tsunami simulation added to visualization site
  • Next by Date: Re: ListDensityPlot Legend?
  • Previous by thread: ListDensityPlot Legend?
  • Next by thread: Re: ListDensityPlot Legend?