# Exclusion disappears but style doesn't work

Bug introduced in 9.0 or earlier and fixed in 11.0.0

Consider this code:

f[x_]:=(6 + 4 x + x^2 - x^3)/(x-2)
Plot[f[x], {x, -10, 10},
Exclusions -> {2},
ExclusionsStyle -> Directive[Red, Dashed]]


It produces this image.

Note that the vertical exclusion is removed, but it is not styled with a red, dashed line. On the other hand, this works.

f[x_]:=(6 + 4 x + x^2 - x^3)/(x-2)
Plot[f[x], {x, -10, 10},
Exclusions -> {-2 + x == 0},
ExclusionsStyle -> Directive[Red, Dashed]]


How come?

• Exclusions inner workings aren't trivial. See for example mathematica.stackexchange.com/a/10502/193 – Dr. belisarius Feb 12 '15 at 17:39
• I believe the quick answer is that Exclusions needs to return a Boolean. – David G. Stork Feb 12 '15 at 17:46
• According to the documentation, Exclusions -> 2 is not correct syntax. However, Exclusions -> {2} is. Both cause the exclusion to appear but none will work with styling. Exclusions -> {x==2} works with styling. This looks like a bug to me and I'm tagging it as such. Can you please report to Wolfram and let us know what they said? In the bug report I would reference the Exclusions -> {2} syntax as this is clearly documented. – Szabolcs Feb 12 '15 at 18:20
• I am guessing that the function is f[x_] = (x + 1)^2 (x - 3)/(2 - x);; however, you should includes its definition in your question. – Bob Hanlon Feb 12 '15 at 21:02
• I did report this to Wolfram. – David Feb 12 '15 at 23:00