# This is trying to plot a simple version from .csv second trial
import csv
import math
import numpy as np
import sys, os
from matplotlib import pyplot
#记得一定要定义变量
listage = []
listnum = []
with open('t05_2.csv', 'r', encoding='utf-8') as f:
reader = csv.reader(f)
header = next(reader)
for row in reader:
listage.append(row[24])
listnum.append(row[9])
x = listage
y = listnum
pyplot.plot(x, y,)
pyplot.title("test5_1")
pyplot.show()
pyplot.savefig('.test5_1.jpg',dpi=300) # the resolution can be set here as well
#This trial proved that the .csv format may avoid the data type conversion and the row separation problem
# However, the present problem is that the value sequence is incorrect.