I am preparing a notebook that shows the scores achieved in some exams. The scores can be multiples of 2, from 0 to 100. I would like the bar chart to have a bar for each possible score (0, 2, 4, …, 100), even if there is no occurrence for that particular score. My data is not aggregated (ie they contain one row for each participant), so they must be aggregated. I tried both binX and groupX (see notebook below), each has its own problems:
The “missing” scores appear, but only if they are intermediate. So, if the achieved scores are 4, 6 and 10, the bars that will appear are 4, 6, 8 and 10. But there will be no bars for 0 and 2, and no bars for 12 and above.
Also, the scores appear in between the bars, not exactly beneath the bars:
The “missing” scores don’t appear, intermediate or not. However, the scores appear at the correct point.