Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

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

Search the Archive

Re: Changing Line Color in Plot

  • To: mathgroup at
  • Subject: [mg96130] Re: Changing Line Color in Plot
  • From: Alexei Boulbitch <Alexei.Boulbitch at>
  • Date: Fri, 6 Feb 2009 04:11:50 -0500 (EST)

You may do it in several ways, still staying kind to environment.
Here is one of them. Assume z is such a value, and 0<z<zmax;
Denote y=z/zmax.  Then 0<y<1
Execute the following:

f[y_] := Plot[Sin[x], {x, 0, 2 Pi}, PlotStyle -> Hue[y]];
It may help. Success, Alexei

I am trying to change the color of a line in a simple Plot of a function
but want the color to be based on a value outside of that function. Any

Robert P. Yerex, Ph.D., MBA
Chief Economist / Director -  Data Mining
Kronos Incorporated
Talent Management Division
p: 503-596-5015

Experts at Improving the Performance of People and Business(tm)

P Be kind to the environment, please don't print this e-mail unless

Alexei Boulbitch, Dr., Habil.
Senior Scientist

ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern

Phone: +352 2454 2566
Fax:   +352 2454 3566


This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.

  • Prev by Date: Re: Palettes stay behind other open windows
  • Next by Date: Re: FindFit & NIntegrate
  • Previous by thread: Re: Changing Line Color in Plot
  • Next by thread: Re: specifying the integration interval using a function