Histogram Construction Tool

Histogram Construction Tool
Loading the math board and drawing, please wait…
2020-04-03 15:05
This example demonstrates how to construct a histogram using GeoGebra. Key mathematical concepts include data frequency, interval division, and statistical analysis. Using commands like Length, Min, Max, If, CountIf, users can flexibly adjust data intervals and frequency distribution. Suitable for high school and above students and teachers for teaching statistics and data analysis.

GeoGebra Commands & Parameters

  1. Length(Data) → n
  2. Min(Data) → p
  3. Max(Data) → q
  4. If(d > 1, 1, If[d > 0.1, 0.1, 0.01]) → t
  5. CountIf(A2 ≤ x ≤ C2, Data) → H2
  6. CountIf(A3 ≤ x ≤ C3, Data) → H3
  7. CountIf(A4 ≤ x ≤ C4, Data) → H4
  8. CountIf(A5 ≤ x ≤ C5, Data) → H5
  9. CountIf(A6 ≤ x ≤ C6, Data) → H6
  10. CountIf(A7 ≤ x ≤ C7, Data) → H7
  11. CountIf(A8 ≤ x ≤ C8, Data) → H8
  12. CountIf(A9 ≤ x ≤ C9, Data) → H9
  13. Sequence(a - t / 2 + ((i - 1) * d), i, 1, k + 1, 1) → Boundaries
  14. Frequency(Boundaries, Data) → Freq
  15. Sequence(Polygon[(2 + (2 * (i - 1)), 0), (2 + (2 * (i - 1)), Element[Freq, i] / b), (2 + (2 * i), Element[Freq, i] / b), (2 + (2 * i), 0)], i, 1, k, 1) → Block
  16. Max(ceil(Max[Freq] / b), 2) → u
  17. Segment((0, 0), (0, u + 1)) → Yaxis
  18. Sequence(Segment[(0, (0.2 * i)), (2 + (2 * k) + 1, (0.2 * i))], i, 1, ((u + 1) * 5), 1) → Hori1
  19. Sequence(Segment[((0.2 * i), 0), ((0.2 * i), u + 1)], i, 1, ((2 + (2 * k) + 1) * 5), 1) → Vert1
  20. Sequence(Segment[(i, 0), (i, u + 1)], i, 1, 2 + (2 * k) + 1, 1) → Vert2
  21. Segment((1.2, 0), (2 + (2 * k) + 1, 0)) → Xaxis
  22. Segment((0.8, 0.4), (1, -0.4)) → h
  23. Segment((1, -0.4), (1.2, 0)) → i
  24. Segment((-0.2, 0), (0.6, 0)) → f
  25. Sequence(Segment[(i, 0), (i, -0.2)], i, 3, 2 + (2 * k) - 1, 2) → Vert3
  26. Sequence(a - t / 2 + (((2 * i) - 1) * d / 2), i, 1, k, 1) → ClassMark
  27. Sequence((i * b), i, 2, u + 1, 2) → FreqMark
  28. Sequence(Segment[(0, i), (-0.2, i)], i, 2, u + 1, 2) → Hori3
  29. Sequence((-0.5 - (0.25 * (ceil(lg(Element[FreqMark, i / 2] + 1)) - 1)), i - 0.15), i, 2, u + 1, 2) → Ypoint
  30. Sequence((i - 0.15 - (0.15 * ceil(lg(Element[ClassMark, (i - 1) / 2] + 1) - 1)), -0.6), i, 3, 2 + (2 * k) - 1, 2) → Xpoint
  31. RotateText("Frequency", 90°) → text17
  32. Textfield(Title) → InputBox1
  33. Textfield(Data) → InputBox2
  34. Textfield(a) → InputBox3
  35. Sequence(If[n ≥ i, Element[Data, i], x], i, 1, If[n ≥ 10, 10, n], 1) → list1
  36. Sequence(If[n ≥ i, Element[Data, i], x], i, 11, If[n ≥ 20, 20, n], 1) → list2
  37. Sequence(If[n ≥ i, Element[Data, i], 32], i, 21, If[n ≥ 30, 30, n], 1) → list3
  38. Sequence(If[n ≥ i, Element[Data, i], x], i, 31, If[n ≥ 40, 40, n], 1) → list4
  39. Sequence(If[n ≥ i, Element[Data, i], x], i, 51, If[n ≥ 60, 60, n], 1) → list6
  40. Sequence(If[n ≥ i, Element[Data, i], x], i, 61, If[n ≥ 70, 70, n], 1) → list7
  41. Sequence(If[n ≥ i, Element[Data, i], x], i, 71, If[n ≥ 80, 80, n], 1) → list8
  42. Sequence(If[n ≥ i, Element[Data, i], x], i, 81, If[n ≥ 90, 90, n], 1) → list9
  43. Sequence(If[n ≥ i, Element[Data, i], x], i, 41, If[n ≥ 50, 50, n], 1) → list5
  44. Sequence(If[n ≥ i, Element[Data, i], x], i, 91, If[n ≥ 100, 100, n], 1) → list10
  45. TableText({list1, list2, list3, list4, list5, list6, list7, list8, list9, list10, "."}) → text21
  46. Segment((0.6, 0), (0.8, 0.4)) → g
  47. Append(Element[list11, 1], Sequence[Element[list21, i], i, 1, k, 1]) → list25
  48. Append(Element[list11, 2], Sequence[Element[list22, i], i, 1, k, 1]) → list26
  49. Append(Element[list11, 3], Sequence[Element[list23, i], i, 1, k, 1]) → list27
  50. Append(Element[list11, 4], Sequence[Element[list24, i], i, 1, k, 1]) → list28
  51. TableText({list25, list26, list27, list28}, "vc|_") → text22
  52. Sequence(Segment[(0, i), (2 + (2 * k) + 1, i)], i, 0, u + 1, 1) → Hori2

AI Drawing Prompt Reference

Create a histogram construction tool interface. On the left, display a data table with raw values. On the right, show a histogram with several equal-width rectangular bars, where bar height represents frequency for each interval. The bars sit on a horizontal axis with interval boundaries and class marks labeled. The vertical axis has frequency tick marks. Include grid lines, axis labels, and input boxes for adjusting interval width and start point. A title bar is at the top, and data entry area is on the left. The layout is clean and suitable for teaching.
The prompt above was compiled from the original drawing commands and is for reference only.