4
$\begingroup$

Here is an example,

enter image description here

You can see that the the label is slanted. This is due to the subscript. Is there a way to obtain this label, with the subscript, but unslanted?

$\endgroup$
5
  • $\begingroup$ Can't test, so: try wrapping the string in StandardForm[]. $\endgroup$ – J. M.'s ennui Sep 6 '17 at 16:01
  • $\begingroup$ @J.M. That works, but now I cannot set the font of the label, which is important in a publication figure. $\endgroup$ – becko Sep 6 '17 at 16:04
  • $\begingroup$ Then, try StandardForm[Style[string, FontFamily -> "Times"]]. $\endgroup$ – J. M.'s ennui Sep 6 '17 at 16:07
  • $\begingroup$ @J.M. Thanks, that works. What I tried before was Style[StandardForm[string ..., which ignores the style specification. Feel free to post an answer. $\endgroup$ – becko Sep 6 '17 at 16:10
  • $\begingroup$ I was spitballing since I don't have a computer at the moment. :) Please write an answer yourself if indeed you got it to work. $\endgroup$ – J. M.'s ennui Sep 6 '17 at 16:11
3
$\begingroup$

Changing the FormatType to StandardForm seems like overkill. Instead, I would recommend modifying the SingleLetterItalics option:

BarChart[{1}, ChartLabels->{Style[Subscript[A,x], SingleLetterItalics->False]}]

enter image description here

$\endgroup$
2
$\begingroup$

Following the suggestion of @J.M., simply use StandardForm[Style[string, FontFamily -> "Times"]] in the label.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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