4Manuals

  • PDF Cloud HOME

我得到x和y标签以及增量数据,但没有图形线。使用Jupyter Notebook Download

    如何将文本边界框与pyplot.Rectangle对齐? 导入类问题 在Python数据框中选择列时出错 使用Rabbit的pika确认消息 如何在按住键的同时暂停VideoStream? Python OpenCV TypeError:无法处理此数据类型 使用buildozer不会下载sdl2_image SMTPSenderRefused,421,超出超时 Tensorflow多线程推理比单线程推理慢 关于python中变量的困惑。 python如何使用变量?

# imports the necessary libraries
import pandas as pd
import matplotlib.pyplot as plt

# loads the unemployment dataset`enter code here`
unemployment = pd.read_csv(r'c:\unemployment.csv')

# title
plt.title('U.S. unemployment rate', fontsize = 20)

# x and y axis labels`enter code here`
plt.xlabel('Year')
plt.ylabel('% of total labor force')

# plot
plt.plot(unemployment["Year"], unemployment["Value"])

# saves the image
plt.savefig("unemployment.png")

# shows the image
plt.show()

0 个答案:

没有答案



Similar searches
    我必须在Excel中将UTC时间转换为IST 如何在Python中打印此输出[自上而下(偶数)] [自下而上(奇数)] 在移动3D开发中应该使用什么? 通过打字稿中的反射API获取静态字段 当widget =“ many2many_tags”时,在many2many字段中添加按钮