MathGroup Archive 1996

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

Search the Archive

Re: Plot and colors


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