diff --git a/algods/algods.py b/algods/algods.py index fa48458..ac17ebc 100644 --- a/algods/algods.py +++ b/algods/algods.py @@ -3,7 +3,6 @@ import unicodedata import sys from typing import Optional -from matplotlib import pyplot as plt import numpy as np SHINGLE_SIZE = 5 # Known as k @@ -331,6 +330,8 @@ def graph(stream, display_tqdm: bool = False) -> None: """ Draw statistic graphs about false-positive and true positive rates using matplotlib. """ + from matplotlib import pyplot as plt + docs = [line.rstrip('\n') for line in stream] # Read stream docs = [normalize(doc) for doc in docs] # Remove special characters and normalize accents