# Put individual student values onto a bar chart

I want to get the classes responses populated onto a bar chart.

The data input is slide 3 and I would like the bar chart on slide 4.

If anyone could help, that would be fab! Thanks!

This should do the trick.

Thank you so much! Is there any chance you could tell me how you did that?! I have so many idea for my lessons and zero coding experience. I do love to learn a formula though!

Most of the work is on slide 4, in the graph component. Here’s the code I used: The first line aggregates the class answers from slide 3, creates a list of all those numbers, and sends them to the graphing calculator. The second line is just adjusting the graphing window so the data fits within the graphing screen. The 25 may need to be adjusted depending on whether or not you think more than 25 students will estimate the same age.

In the actual graph, I have this: Line 1 isn’t necessary as the class data will override what I have in this list, but I used it just to test out everything else. Line 2 creates the histogram. Line 3 is used for the bounds as the maximum value on the x-axis. Hopefully this helps a little, but let me know if you need more clarification!

1 Like

I don’t think I’ll be making my own any time soon but can use this when I am comparing different bits. Thank you!

Is there a way to do this so it just compiles 1 student’s data into the histogram? Each student has 10 data entries. I was able to make a histogram with all of the class data following these steps. But can I make it so each students sees just their data in a histogram? The same 10 inputs for both histograms. Just one that is individual data and then the one I already have that aggregates the class data. Thanks for your time!

I might be answering this wrong if I interpreted your question incorrectly, so let me know if I’m way off here. It sounds like the student has 10 inputs from the same data source (i.e. throw a ball 10 times and track the speed of the ball, submit those speeds)? If so, I would have the student put the data in a table. After that, it’s pretty similar to the directions above. In a graph component, put this code:

``````numberList(`A`): table.columnNumericValues(1)
``````

This would be if the first column contains the data. Everything else should be the same.

1 Like

Thank you! I will play with this. The inputs aren’t currently in a table. It’s just 10 mathematical inputs and they’re named input1, input2, input3, etc, so that then I can aggregate the inputs to make a class histogram. If I organized it in a table instead, would I still be able to aggregate the class data?

You can aggregate table cells as well, just use `table.cellNumericValue(1,2)` instead of input1 etc., or `graph.number(`A`)` for each element from the list @cwinske created above.

Perfect! I will play around with it. Doing a lot of Googling and learning on the fly as I find myself using Desmos a ton during our remote learning with our students. Thank you for the help.

Hi. Me again. Can you adjust the aggregate command so that it collects all of the column entries for a single table all at once? Or does it have to be done one cell at a time?

I’ve got a table with 2 columns and 4 rows. (1st row is a header and all of 1st column is pre-filled.) I want it to collect all of column 2 for all students and then ultimately average the data.

`aggregate` can only do numbers, so one at a time.

That makes sense. Thank you for the reply!