You can try mapping pPoäng
:
BarChart[pPoäng /@ Range[2, 26], ChartLabels -> Range[2, 36], AxesLabel -> {X}, ImageSize -> Large]
I wouldn't suggest this, though. If you look at the Information of pPöang, you'll see that it is a function with values it will look up for each number 2..36.
?pPoäng
It would make more sense to use a list which will make it easier to use with BarChart as well but it will require some modifications to your code:
poäng[p_][{x_, x_, x_, y_, y_} /; x != y] := 3 x + 2 y == p;
pPoäng = N[Count[omega, _?(poäng[#])]/ntot] & /@ Range[2, 36];
BarChart[pPoäng, ChartLabels -> Range[2, 36], AxesLabel -> {X}, ImageSize -> Large]
Alternatively, if you have Mathematica 10, you can use pPoäng
as an Association. This just requires you to put this line before the Do:
pPoäng = <||>;
Although I would suggest rewriting poäng
the same way as above and the Do line as
(pPoäng[#] = N[Count[omega, _?(poäng[#])]/ntot]) & /@ Range[2, 36];
This is to keep p
as a local variable.
And then you can draw the chart with
BarChart[pPoäng, ChartLabels -> Range[2, 36], AxesLabel -> {X}, ImageSize -> Large]