Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to define the format for a part of Text in a plot? For instance, is it possible to have v bold and (a) italic:

Show[Graphics3D[Line[{{0, 0, 0}, {1, 1, 1}}]],
 Graphics3D[Text["v(a)", {1.1, 1.1, 1.1}, BaseStyle -> Large]],
 PlotRange -> {{0, 2}, {0, 2}, {0, 2}}]

enter image description here

share|improve this question
up vote 2 down vote accepted

By using Row and Style within a Text element, you can get almost any formatting you want.

Show[
  Graphics3D[Line[{{0, 0, 0}, {1, 1, 1}}]], 
  Graphics3D[Text[Row[{Style["V", 24, Bold], Style["(a)", 24, Italic]}], {1.1, 1.1, 1.1}]], 
  PlotRange -> {{0, 2}, {0, 2}, {0, 2}}]

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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