# Display student multiple choice responses in a histogram

**URL:** <https://cl.desmos.com/t/display-student-multiple-choice-responses-in-a-histogram/1372>\
**Category:** Questions\
**Created:** [August 26, 2020, 12:10am UTC](https://cl.desmos.com/t/display-student-multiple-choice-responses-in-a-histogram/1372 "2020-08-26T00:10:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeMoho](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/joemoho/32/1033_2.png) [@JoeMoho](https://cl.desmos.com/u/JoeMoho)\
**Post date:** [August 26, 2020, 12:10am UTC](https://cl.desmos.com/t/display-student-multiple-choice-responses-in-a-histogram/1372/1 "2020-08-26T00:10:19Z")

</div>

Hello,

My apologies if this was answered as I couldn’t find it through multiple searches. I’d like students to choose from two different options on page 2 and then display the class data as a histogram / bar graph on page 3.

> **[Would You Rather... • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5f459cbcd72d6f359370aadb)**
>
> Which would you rather do? (much help from the excellent wouldyourathermath.com)

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [August 26, 2020, 9:52pm UTC](https://cl.desmos.com/t/display-student-multiple-choice-responses-in-a-histogram/1372/2 "2020-08-26T21:52:54Z")

</div>

Your activity is set to Private. If you’ve already figured out how to make a histogram and a bar graph, then it’s just a matter of setting a variable based on the student’s choice, and using it as a condition to display.

In graph CL:

```auto
number("n"): when yourMCName.isSelected(1) 1
when yourMCName.isSelected(2) 2
otherwise 0

```

If the histogram is selection 1 you would add `{n=1}` to variables or whatever in the graph that will display it. Similar for bar graph, but `{n=2}`.

---

<div class="post-metadata">

**Author:** ![JoeMoho](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/joemoho/32/1033_2.png) [@JoeMoho](https://cl.desmos.com/u/JoeMoho)\
**Post date:** [August 27, 2020, 12:07am UTC](https://cl.desmos.com/t/display-student-multiple-choice-responses-in-a-histogram/1372/3 "2020-08-27T00:07:29Z")

</div>

Thank you for your response. I did figure it out!

---

<div class="post-metadata">

**Author:** ![Leatham.Forrester](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/leatham.forrester/32/3758_2.png) [@Leatham.Forrester](https://cl.desmos.com/u/Leatham.Forrester)\
**Post date:** [August 21, 2022, 5:49pm UTC](https://cl.desmos.com/t/display-student-multiple-choice-responses-in-a-histogram/1372/4 "2022-08-21T17:49:09Z")

</div>

Would it be possible to only show the highest response chosen?
