Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: ListDensityPlot Legend?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58660] Re: ListDensityPlot Legend?
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 13 Jul 2005 03:28:53 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <db02nn$r54$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

and Graphics`Legend` does not help ?

Needs["Graphics`Legend`"]

data = Table[Random[Integer, {0, 2}], {128}, 
{128}];

ShowLegend[
ListDensityPlot[data, DisplayFunction -> 
Identity],
{GrayLevel[1 - #] &, 3, " 2", "0", 
LegendPosition -> {1.1, -.4}}];



Regards

  Jens


"juejung" <juejung at indiana.edu> schrieb im 
Newsbeitrag news:db02nn$r54$1 at smc.vnet.net...
> 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: Re: ListDensityPlot Legend?
  • Next by Date: Re: ListDensityPlot Legend?
  • Previous by thread: Tsunami simulation added to visualization site
  • Next by thread: Re: ListDensityPlot Legend?