about "matplotlib" https://aiacademy.jp/media/?p=154 https://matplotlib.org/ --------------------------------------------------------------------- # how to use: module "pyplot" in the package "matplotlib" import matplotlib.pyplot x = [0,1,2,3,4,5,6,7,8,9,10] y = [0, 1, 0, 3, 2, 8, 10, 4, 5, 3, 4] matplotlib.pyplot.plot(x,y) matplotlib.pyplot.show() -------------------------------------------------------------- # how to use: "as" import matplotlib.pyplot as plt x = [0,1,2,3,4,5,6,7,8,9,10] y = [0, 1, 0, 3, 2, 8, 10, 4, 5, 3, 4] plt.plot(x,y) plt.show() ----------------------------------------------------------- # how to use: change colors import matplotlib.pyplot as plt x = [0,1,2,3,4,5,6,7,8,9,10] y = [0, 1, 0, 3, 2, 8, 10, 4, 5, 3, 4] plt.plot(x,y,"r--") plt.show() ------------------------------------------------------ # multiple graphs, y1, y2 import matplotlib.pyplot as plt x = [0,1,2,3,4,5,6,7,8,9,10] y1 = [0, 1, 0, 3, 2, 8, 10, 4, 5, 3, 4] y2 = [7, 8, 4, 9, 0, 3, 1, 9, 6, 5, 10] plt.plot(x,y1,"r--") plt.plot(x,y2,"g--") plt.show() ---------------------------------------------------- # bar graph import matplotlib.pyplot as plt x = [0,1,2,3,4,5,6,7,8,9,10] y = [0, 1, 0, 3, 2, 8, 10, 4, 5, 3, 4] plt.bar(x,y) plt.show()