This question is motivated by this question and its answers.

Firstly, I wish to display "O(x)" instead of "x" as the callout labels. When I do this

lbls = Map[HoldForm["O(" #1 ")"] &, funcs];

I get double parenthesis for the fourth element. How can I avoid this extra parenthesis without altering the formatting style?

Secondly, How can I display only the callout labels without the callout lines?


1 Answer 1


Use HoldForm[] on the head instead:

funs = Callout[#, TraditionalForm[HoldForm[O][#]], Above] & /@
       {n!, 2^n, n^2, n Log[n], n, Log[n]};

LogLogPlot[Evaluate @ funs, {n, E, 1000}, Frame -> True, PlotRange -> {E, 1000}]

with nice labels

As m_goldberg notes in his answer to the linked question, the default layout might not be entirely satisfactory; which necessitates manual position tweaking. I'll leave that up to you.

  • $\begingroup$ Is it not possible to remove the callout lines? $\endgroup$
    – user36426
    Mar 24, 2019 at 16:41
  • 2
    $\begingroup$ Try CalloutStyle -> Transparent. $\endgroup$ Mar 24, 2019 at 16:45
  • $\begingroup$ You can use Labeled instead of Callout. No other changes are needed. $\endgroup$ Jun 14, 2019 at 22:49

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.