GitBucket
Pull requests
Issues
Snippets
Sign in
takane
/
graph.py
Fork
0
Created at Thu Oct 27 17:37:31 JST 2022
Download ZIP
HTTP
Embed
Embed this snippet in your website.
HTTP
Clone with Git using the repository's web address.
Code
Revision
Forks
takane
revised this
on 27 Oct 2022
a0d6712
graph.py
import numpy as np import matplotlib.pyplot as plt import sys args = sys.argv # data01_axis1, data01_value1 = np.loadtxt(args[1], delimiter="|", usecols=range(1,3), unpack=True) data01_axis1, data01_value1 = np.loadtxt(args[1], delimiter="|", usecols=[1,3], unpack=True) data01_axis1, data02_value1 = np.loadtxt(args[1], delimiter="|", usecols=[1,4], unpack=True) fig = plt.figure(figsize=(10, 6)) ax = fig.add_subplot(111) ax.plot(data01_axis1, data01_value1, "-", color="k", label="Training") ax.plot(data01_axis1, data02_value1, "-", color="r", label="Validation") # ax.set_xlim(1000, 3000) ax.set_xlabel("Iterations") ax.set_ylabel("Accuracy") ax.legend(loc="upper left") plt.show()