File size: 323 Bytes
27b3bd7
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import matplotlib.pyplot as plt

def plot_knowledge(archive):
    fig, ax = plt.subplots()

    if len(archive) > 0:
        ax.plot(archive)
        ax.set_title("Knowledge Field K(t)")
        ax.set_xlabel("Step")
        ax.set_ylabel("K")
    else:
        ax.text(0.5, 0.5, "No Data Yet", ha="center")

    return fig