Binning 2 numeric attributes, on both X and Y axis?

CODAP Forums CODAP Help Forum Binning 2 numeric attributes, on both X and Y axis?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5819 Score: 0
    Jacob Sagrans
    Participant

    Is there a way to bin 2 numeric attributes in a graph in CODAP, on both the X and Y axes? I see I can treat one axis as categorical data and then bin the other axis, but I’d like to be able to bin both and not have a separate category for every number on one axis. Thanks!

    #5820
    Bill Finzer
    Keymaster

    Answer: CODAP graphs can only bin one numerical axis. But you can create bins formulaically for a second numeric attribute as shown here. This document randomly generated values for Height and Weight and a slider named interval to control the bin width for a third attribute named Weight_binned. The formula for Weight_binned is

    floor(Weight/interval)*interval+" to " +ceil(Weight/interval)*interval
    

    The enclosed screenshot shows the result plot with both numeric attributes binned.

    #5822
    Jacob Sagrans
    Participant

    Thank you!

    #5965

    Nice Post.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CODAP Help Forum’ is closed to new topics and replies.