I have this function:

de[a_, x_] = -1 + (E^-x x^a)/((-a + x) Gamma[a, x]);

When I do

Plot[Callout[de[-7, x] // Re, "de", {10, .022}, {x, de[-7, x]} /. {x -> 4}], {x, 0, 20}]

I get the expected picture:

enter image description here

However, if I change -7 to -7.5:

Plot[Callout[de[-7.5, x] // Re, "de", {10, .022}, {x, de[-7.5, x]} /. {x -> 4}], {x, 0, 20}]

then I get this disappointing result:

enter image description here

What is wrong here and how to fix it?


1 Answer 1


Evaluate your callout:

Callout[de[-7.5,x] //Re, "de", {10, .022}, {x, de[-7.5,x]} /. {x->4}]

Callout[-1 + Re[E^-x/(x^7.5 (7.5 + x) Gamma[-7.5, x])], "de", {10, 0.022}, {4, 0.0309208 + 0. I}]

Notice that the 4th argument is complex. This is why Callout complains. So, use the real part:

    Callout[de[-7.5,x] //Re, "de", {10, .022}, {x, Re @ de[-7.5,x]} /. {x->4}],
    {x, 0, 20}

enter image description here

  • $\begingroup$ Thank you very much! However, I still don't understand why Mathematica complained about the argument {10, .022}, whereas the real problem was with another argument. $\endgroup$ Commented Aug 15, 2019 at 22:05
  • $\begingroup$ @IosifPinelis the complaint comes from the point specified not being a valid position for the placement of the callout. The system doesn’t know you’re intending to plot the real part of the expression, but it can assuredly & confidently tell you that “the point specified is not valid (though it could say something like ‘because the eqn to be placed upon is complex’)” $\endgroup$ Commented Aug 17, 2019 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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