Suppose that I use:
Text[Style["(1, 0, 0)", 12, Background -> White], {1, 1, 0}] How can I put a few points of padding around the text?
Thanks to Jens:
Initialization cell:
Options[myText] = {Background -> White, Padding -> 1, FrameStyle -> None};
myText[s_, pos_, OptionsPattern[]] := Text[Framed[Style[s, 12], Background -> OptionValue[Background], FrameMargins -> OptionValue[Padding], FrameStyle -> OptionValue[FrameStyle]], pos] Image code using myText:
Show[ ContourPlot3D[{z == Sqrt[x^2 + y^2]}, {x, -2.5, 2.5}, {y, -2.5, 2.5}, {z, 0, 2}, ContourStyle -> {Yellow, Opacity[0.8]}, Mesh -> None], ParametricPlot3D[{r Cos[t], r Sin[t], 2}, {t, 0, 2 π}, {r, 0, 2}, PlotStyle -> {Blue, Opacity[0.5]}, Mesh -> None], ParametricPlot3D[{r Cos[t], r Sin[t], 0}, {t, 0, 2 π}, {r, 0, 2}, PlotStyle -> {LightBlue, Opacity[0.5]}, Mesh -> None], Graphics3D[{ Red, Thick, Arrow[{{0, 0, 0}, {2, 2, 0}}], Black, PointSize[Large], Point[{{0, 0, 0}, 2 {Cos[Pi/4], Sin[Pi/4], 0}}], myText["r = 0", {0, -0.6, 0}], myText["r = 2", 2 {Cos[30 °], Sin[30 °], 0}], Red, Thick, Arrow[{{Cos[Pi/4], Sin[Pi/4], 0}, {Cos[Pi/4], Sin[Pi/4], 2.5}}], Black, PointSize[Large], Point[{{Cos[Pi/4], Sin[Pi/4], 0}, {Cos[Pi/4], Sin[Pi/4], 1}, {Cos[Pi/4], Sin[Pi/4], 2}}], myText["z = r", {Cos[35 °], Sin[35 °], 0.8}], myText["z = 2", {Cos[35 °], Sin[35 °], 1.8}] }], AxesLabel -> {"x", "y", "z"}, PlotRange -> {{-2.5, 2.5}, {-2.5, 2.5}, {0, 2.5}} ] For some reason, I am getting frequent kernel beeps when running the cell containing the image code. I don't know why.





