Plot[Tan[x], {x, 0, 20}, Exclusions -> Cos[x] == 0, ExclusionsStyle -> Directive[Red, Dashed]]
Plot3D[1/(y^2 - x^3 + 3 x - 3), {x, -3, 3}, {y, -3, 3}, Exclusions -> y^2 - x^3 + 3 x - 3 == 0, MaxRecursion -> 3, Mesh -> None]