From 2560d862d5019db1b103a6e6a9c14dfa66afe78d Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 8 Sep 2024 11:37:41 +0200 Subject: Move display() to finance.visualize.py --- finance/flow.py | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'finance/flow.py') diff --git a/finance/flow.py b/finance/flow.py index bc2ee0a..4cf68db 100644 --- a/finance/flow.py +++ b/finance/flow.py @@ -3,8 +3,6 @@ from datetime import datetime from decimal import Decimal from typing import Generator -import matplotlib.pyplot - @dataclasses.dataclass(kw_only=True, frozen=True) class Flow: @@ -66,15 +64,3 @@ def simulate( values.append(value) return (dates, values) - - -def display(data: tuple[list[datetime], list[Decimal]]) -> None: - matplotlib.pyplot.plot( - list(data[0]), # type: ignore - [float(i) for i in data[1]], - label="Money", - ) - matplotlib.pyplot.xlabel("Time") - matplotlib.pyplot.legend() - matplotlib.pyplot.xticks(rotation=45) - matplotlib.pyplot.show() -- cgit v1.2.3-70-g09d2