Re: display pixel value with ListDensityPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg8069] Re: display pixel value with ListDensityPlot
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Mon, 4 Aug 1997 01:47:52 -0400
- Organization: University of Western Australia
- Sender: owner-wri-mathgroup at wolfram.com
Timothy Williams wrote:
> ListDensityPlot can give the coordinates of a 2D density plot, but not
> the actual values. Is there a way to display the value of an image
> using the mouse?
In the Mathematica Journal 3(1): 22 there is an example by Theo Gray
from Wolfram Research, Inc. of "aural" encoding:
It is sometimes interesting to encode information in the form of
sounds. Here is an example that associates to a location in the (x,
y)-plane a sound whose frequency is proportional to the value of a
function f(x,y):
points=15;
sounds = First[Graphics[Table[Rectangle[{n, m},
{n + 4/points, m + 4/points},
Graphics[{Play[Evaluate[Sin[2000*2^Sin[n*m]*x]*
ArcTan[100*x]*Cos[(x*Pi)/(2*0.2)]],
{x, 0, 0.2}, PlayRange -> {-1, 1},
DisplayFunction -> Identity][[1]]}]],
{n, 0, 4 - 4/points, 4/points},
{m, 0, 4 - 4/points, 4/points}]]];
Note the use of Rectangle
DensityPlot[Sin[x y],{x,0,4},{y,0,4},Epilog->sounds,
PlotPoints->points];
Select the graphic, and then Shift-Click on it. Hold down the mouse
button and drag around to hear a changing sound.
Cheers,
Paul
____________________________________________________________________
Paul Abbott Phone: +61-8-9380-2734
Department of Physics Fax: +61-8-9380-1014
The University of Western Australia
Nedlands WA 6907 mailto:paul at physics.uwa.edu.au
AUSTRALIA http://www.pd.uwa.edu.au/Paul
God IS a weakly left-handed dice player
____________________________________________________________________