MathGroup Archive 1996

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

Search the Archive

Re: Plot and colors

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4410] Re: Plot and colors
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Sun, 21 Jul 1996 22:09:10 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Laurent BOUAZIZ wants the graph of a function colored according to  
the function's value.

Laurent:
Here's an example of one way

Block[{$DisplayFunction=Identity},
	Plot[{Sin[x]},{x,0,2Pi}]/.
	Line[lst_] :> 			
		({Hue[{.5,.5}.#.{0,1}],Line[#]}&/@Partition[lst,2,1])
]//Show

Allan Hayes,
hay at haystack.demon.co.uk

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: surface plots from irregularly spaced data (scatter) points
  • Next by Date: Re: fonts
  • Previous by thread: Re: Plot and colors
  • Next by thread: Re: Mandelbrot & Julia sets