Services & Resources / Wolfram Forums
MathGroup Archive
*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: False image plot

  • To: mathgroup at
  • Subject: [mg58374] Re: False image plot
  • From: Peter Pein <petsie at>
  • Date: Tue, 28 Jun 2005 21:57:05 -0400 (EDT)
  • References: <d9r528$56u$>
  • Sender: owner-wri-mathgroup at

tornado78 schrieb:
> Ok here is another one i need help on
> How do you get mathematica to take three lists of numbers, plot one as x, one as y and the third not as a 3rd dimension but as a color value of some sort for example blue for low values, red and yellow for high values of the third set of numbers
> thanks
Say you've got
x = Range[100]/100;
y = 4*x*(1 - x);
z = Sin[2*Pi*x]/x;

I want to use Hue[] for the colour. So I have to normalize the z-values:

col = (z - Min[z])/(Max[z] - Min[z]);

And plot it:

Show[Graphics[{Hue[#3], Point[{#1, #2}]}]&[Sequence @@ #1]& /@
   Transpose[{x, y, col}],
   PlotLabel -> "Gravity's Rainbow", Background -> DarkSlateBlue];

Peter Pein

  • Prev by Date: Re: exact integer from Log[ ]
  • Next by Date: Re: exact integer from Log[ ]
  • Previous by thread: Re: False image plot
  • Next by thread: Re: False image plot