2
$\begingroup$

In my plot I have used an exclusion at the asymptote like this:

Exclusions -> {x == -1}, ExclusionsStyle -> Dashing[Medium]

The question is, how can I make the dashes at the asymptote Dashing AND Red? It seems that Mathematica only accepts either Dashing or Red, but not both. Any ideas?

I have tried something like this, but it didn't work:

Exclusions -> {x == -1}, ExclusionsStyle -> {Red, Dashing[Medium]}

Thanks

Plot

$\endgroup$
3
$\begingroup$

This is one of those cases where one can use Directive or wrap the list of exclusions in another list.

Plot[E^(-(1 + x)^(-1)), {x, -3., 2.}, 
   PlotRange -> {{-3., 2.}, {-0.5, 5.}}, 
   AxesOrigin -> {0., -0.5}, 
   Exclusions -> {-1}, 
   ExclusionsStyle -> {{Red, Dashing[Medium]}}, Blue]

plot

In my plot, the 2nd element of the ExclusionsStyle list is set to Blue and sets the color of the boundary markers. That explains why two levels of listing is needed. It also explains why Dashing[Medium] has no effect on the OP's plot -- a dashed boundary marker is invisible.

$\endgroup$

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