Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'FrameLabel italicizes letter before subscript' topicStudent Support Forum > General > "FrameLabel italicizes letter before subscript"

Next Comment >Help | Reply To Topic
Author Comment/Response
Robby
03/21/12 07:53am

I'm having some trouble figuring out a weird behavior in Mathematica. I want a vertical axis label that includes a subscript in it (like H2O) but for some reason, the H is italicized. If multiple characters precede the subscript, it does not become italicized (AH2O). I'm not sure how well code copy and pastes so I've also attached the notebook.

Thanks!


countries = CountryData["G8"];
data = Table[
With[{country = c, v = Round@CountryData[c, "GDPPerCapita"]},
Button[v, Speak[StringJoin[country, ", $", ToString[v]]]]], {c,
countries}];
ylabel = "\!\(\*SubscriptBox[\(H\), \(2\)]\)O";
BarChart[data, PlotLabel -> "GDP Per Capita",
ChartLabels -> Placed[countries, Below, Rotate[#, Pi/2.4] &],
ChartLabels ->
Placed[labels, Axis,
Rotate[Style[#, 12, FontFamily -> "Arial"], 0] &], Frame -> Left,
FrameLabel -> {None, Style[ylabel, 12, FontFamily -> "Arial"]}]
countries = CountryData["G8"];
data = Table[
With[{country = c, v = Round@CountryData[c, "GDPPerCapita"]},
Button[v, Speak[StringJoin[country, ", $", ToString[v]]]]], {c,
countries}];
ylabel = "\!\(\*SubscriptBox[\(AH\), \(2\)]\)O";
BarChart[data, PlotLabel -> "GDP Per Capita",
ChartLabels -> Placed[countries, Below, Rotate[#, Pi/2.4] &],
ChartLabels ->
Placed[labels, Axis,
Rotate[Style[#, 12, FontFamily -> "Arial"], 0] &], Frame -> Left,
FrameLabel -> {None, Style[ylabel, 12, FontFamily -> "Arial"]}]

Attachment: subscript.nb, URL: ,

Subject (listing for 'FrameLabel italicizes letter before subscript')
Author Date Posted
FrameLabel italicizes letter before subscript Robby 03/21/12 07:53am
Re: FrameLabel italicizes letter before subscript Forum Modera... 03/21/12 12:52pm
Next Comment >Help | Reply To Topic