# TraditionalForm for PlotLabel with a parameter

This is a simple variation/spin off of this question, but I am having trouble. In the second example in the original question, I'm trying to get the $a=$ in the PlotLabel to be in TraditonalForm (with an italicized $a$ instead of a non-italic a).

testplot[a_] := Plot[a x^2, {x, 0, 3}, PlotLabel -> StringForm["a=1", a]]

testplot[2]


Edit: Here's my particular example of this issue in v10

   Table[ContourPlot[Norm[{x, y}, p] == 1, {x, -1.2, 1.2}, {y, -1.2, 1.2},
PerformanceGoal -> "Accuracy", ImageSize -> 250,
PlotLabel -> Text["p=" <> ToString@p, FormatType -> TraditionalForm]],
{p, {1, 2, 3, 4, 10, 50, 500}}]

• Even if you are taking code from an other question you should provide some code here.
– Öskå
Commented Nov 26, 2014 at 15:20
• I also suggest that you formulate here your question completely Commented Nov 26, 2014 at 15:38
• PlotLabel -> Text["a=" <> ToString@a, FormatType -> TraditionalForm]?
– Öskå
Commented Nov 26, 2014 at 15:41
• @Öskå doesn't work Commented Nov 26, 2014 at 15:47
• It works pretty fine for me. I don't know what else you are expecting then.
– Öskå
Commented Nov 26, 2014 at 15:51

I believe this accomplishes your goal:

Table[ContourPlot[
Norm[{x, y}, p] == 1, {x, -1.2, 1.2}, {y, -1.2, 1.2},
PerformanceGoal -> "Accuracy", ImageSize -> 250,
{p, {1, 2, 3, 4, 10, 50, 500}}]


The \[ThinSpace] is included just to properly space before the equal sign.

I would avoid strings and just use an expression (Mathematica by default formats labels in TraditionalForm):

Table[
ContourPlot[
Norm[{x,y},p]==1,
{x,-1.2,1.2},
{y,-1.2,1.2},
PlotLabel->HoldForm[p]==p
],
{p,{1,500}}
]


In comparison to the accepted answer, note that the labels use a long equal sign instead of a regular equal sign, and the spacing on either side of the equal sign is even.