Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*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 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