I found the following labeling code (by @Brett) and like to use it as an example:
Module[{
labels = {"ABC Learning focused", "DEF Positively oriented",
"GHI Continuous", "KLM Timely", "NOP Clear criteria",
"RST Flexible", "UWZ Suited to student level"},
data = {8, 6, 4, 5, 5, 9, 9}
},
BarChart[data,
ChartLabels -> Placed[
labels,
Axis,
Block[{text = Rotate[#, (2/7) Pi]},
Row[{text, Invisible[text]},
"\[NegativeMediumSpace]"]
]&
],
PlotRange -> {Automatic, {0, 10}}, Ticks -> {None, Range[0, 10, 2]},
ImagePadding -> {{20, 0}, {95, 0}}
]
]
This code
would use the labels given in the desired form. My question is how to label the same chart by selecting only the "first 3 letters" (capital or small does not matter) of the existing labels, such as ABC
as the label for the first bar in the histogram; DEF
as the second label and so on. In fact, such labeling can be generalized by using a rule such as "select CAPITAL letters` only that appear in a label such as those in this example.
For now, I only want to select the first 3 capital letters.
StringTake[#, 3] & /@ labels
$\endgroup$