# How can I remove extra parentheses in a plot callout?

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?

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}]


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.

• Is it not possible to remove the callout lines? – Majis Mar 24 at 16:41
• Try CalloutStyle -> Transparent. – J. M. will be back soon Mar 24 at 16:45
• You can use Labeled instead of Callout. No other changes are needed. – MinHsuan Peng Jun 14 at 22:49