Added histogram functions and type and mark options.

This commit is contained in:
Teal Dulcet
2023-08-30 05:57:03 -07:00
parent 43a2a94a2e
commit 4b613fb9eb
10 changed files with 742 additions and 219 deletions

View File

@@ -2,6 +2,8 @@
# Teal Dulcet, CS546
# Run: python3 -OO test.py
import math
import random
import sys
@@ -112,10 +114,18 @@ xmax = 20
ymin = -20
ymax = 20
print("\nOutput array as histogram\n")
array = [random.gauss(0, 1) for i in range(100)]
for style in graphs.style_types:
graphs.histogram(height, width, xmin, xmax, ymin, ymax, array, style=style)
print("\nOutput single array as plot\n")
array = [range(i, i + 2) for i in range(10)]
for style in graphs.style_types:
graphs.array(height, width, xmin, xmax, ymin, ymax, array, style=style)
for atype in graphs.atype_types:
for mark in graphs.mark_types:
for style in graphs.style_types:
graphs.plot(height, width, xmin, xmax, ymin, ymax,
array, atype=atype, mark=mark, style=style)
print("\nOutput single function as graph\n")
for style in graphs.style_types: