画两个图,一个用虚线,一个用实线,再放一块儿.
Show[Plot[1/(x - 2),{x,0,4},PlotStyle -> Dashing[Tiny]],
Plot[1/(x - 2),{x,0,2,4}]]