Skip to main content
adding appropriate tags in hopes of increasing visibility in searches
Link
deleted 19 characters in body
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

I have a piecewise function that I would like to plot but I was wondering if it is possible that each part of the function that is plotted when its corresponding condition is true be plotted with a different color thanfrom the other parts. That is, if I have a Piecewise function Piecewise[{{val1, cond1},{val2,cond2},{val3,cond3}}] then I want val1, val2, and val3 to be plotted with different colors so that I can differentiate each case in the plot. Thanks in advance.

I have a piecewise function that I would like to plot but I was wondering if it is possible that each part of the function that is plotted when its corresponding condition is true be plotted with a different color than the other parts. That is, if I have a Piecewise function Piecewise[{{val1, cond1},{val2,cond2},{val3,cond3}}] then I want val1, val2, and val3 to be plotted with different colors so that I can differentiate each case in the plot. Thanks in advance.

I have a piecewise function that I would like to plot but I was wondering if it is possible that each part of the function that is plotted when its corresponding condition is true be plotted with a different color from the other parts. That is, if I have a Piecewise function Piecewise[{{val1, cond1},{val2,cond2},{val3,cond3}}] then I want val1, val2, and val3 to be plotted with different colors so that I can differentiate each case in the plot.

Clarified title
Link
David
  • 15k
  • 6
  • 51
  • 82
Loading
Tweeted twitter.com/#!/StackMma/status/164814645633355778
added 2 characters in body
Source Link
Brett Champion
  • 20.9k
  • 2
  • 65
  • 122
Loading
Source Link
mirandaio
  • 403
  • 4
  • 6
Loading