WeightHistogram( C )
WeightHistogram( C, h )
The function WeightHistogram plots a histogram of weights in code
C. The maximum length of a column is h. Default value for h is
1/3 of the size of the screen. The number that appears at the top of
the histogram is the maximum value of the list of weights.
gap> H := HammingCode(2, GF(5));
a linear [6,4,3]1 Hamming (2,5) code over GF(5)
gap> WeightDistribution(H);
[ 1, 0, 0, 80, 120, 264, 160 ]
gap> WeightHistogram(H);
264----------------
*
*
*
*
* *
* * *
* * * *
* * * *
+--------+--+--+--+--
0 1 2 3 4 5 6
newcommandbinomial[2]#1 choose #2
GAP 3.4.4