forked from rug-oop-2024/tutorial_3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (18 loc) · 684 Bytes
/
main.py
File metadata and controls
27 lines (18 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import argparse
from pathlib import Path
from data_plotter.data_handler import Dataset
from data_plotter.data_plotter import DataPlotter
def parse_args():
parser = argparse.ArgumentParser(description="A simple data plotter")
parser.add_argument("data_path", type=str, help="The path to the data file")
return parser.parse_args()
def main():
args = parse_args()
data_path = Path(args.data_path)
data = Dataset(data_path)
plotter = DataPlotter(data)
plotter.hist_1d("petal.width")
plotter.scatter_2d("petal.width", "petal.length")
plotter.scatter_3d("petal.width", "petal.length", "sepal.width")
if __name__ == "__main__":
main()