| 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: , |
|