Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I wrote some code to get a piecewise plot which is displayed correctly. Now I'd like to join the various parts of the plot, using some kind of interpolation, to get a continuous chart even though it's actually a piecewise one.

Let me to give you an example. Assuming $f_1(2) = 3$ and $f_2(2) = 1$, how can I join the points $(2,3)$ and $(2,1)$ in the plot?

share|improve this question
    
Should we assume that f1(3) and f2(1) are undefined? –  Sparr Mar 22 '13 at 21:01
add comment

1 Answer 1

up vote 9 down vote accepted

Your questions is not that clear to me, but I guess you want to join the two piece wise parts with a vertical line. That would be Exclusions.

Plot[Piecewise[{{3, x < 2}, {1, x > 2}}], {x, -2, 5}, Exclusions -> None]

leads to

enter image description here

share|improve this answer
    
Thanks you, what I needed! –  FrankBr Mar 23 '13 at 7:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.