MathGroup Archive 1998

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

Search the Archive

piecewise coloring


Dear Mathematica's aficionados,

a Student give me the following Problem:

He defines a piecewise function with a Which command:

Say f[x_] := Which[ x < 1 , 2x+3 , x < 2 , 3x-2 , x < 5, 4x-3 , x >= 5 ,
2x]

The Problem is to plot f with different Colors for the different Parts.

Can you find an elegant Solution?

I have a Solution with many Plots and A Show Command.

Bye Fred



  • Prev by Date: MathLink results differ from those in regular interface
  • Next by Date: Re: Differentiating Piecewise Functions
  • Previous by thread: MathLink results differ from those in regular interface
  • Next by thread: Permutations.