# Group Numerical Data into Bins on a Graph

It is possible to group numeric data into discrete bins on a graph in CODAP. In order to do this, the graph must have a numerical attribute on one axis, with the other axis being left blank or having a categorical attribute (binning along two axes that both have numerical attributes is not possible via the method described below, although there is a workaround).

To group the numeric data into bins, click on the "Configuration" icon to the right of the graph and select "Group into Bins."

You will see the graph change, putting the numeric variables into bins, and specifying the endpoints of the bins on the axis in a manner such as [0,10). *(This particular bin contains values ≥ 0 but < 10.)*

The binwidth is set by default, however, if you click on the "Configuration" icon again you can change it by typing in a new value for "Bin width." The "Alignment" paramater can also be changed, which affects where the bins start/end (in the example below, it has been changed from 0 to 10, so there will be bins from 10 to 30, 30 to 50, etc. instead of 0 to 20, 20 to 40, etc.).

Clicking on "Points" under "Configuration" will ungroup the data (changing it back to a continuous numerical attribute on the graph).

The gif below demonstrates additional features in binning a numeric attribute on a graph in CODAP. Note: Be careful when selecting the percent option, as shown in the gif below, to make sure you understand what the percentages are telling you. There will only be one percentage option given. In the example below, it is showing the percentage of mammals in each of the 3 age bins for each of the 3 diet categories (adding up to 100% for plants, 100% for meat, and 100% for both, i.e. percentages by row).