1

我试图让我的传说脱离情节,但其中一些被裁剪了。

我的数据:

Origin  China   India   Pakistan    Philippines United Kingdom of Great Britain and Northern Ireland
Year                    
1980    5123    8880    978 6051    22045
1981    6682    8670    972 5921    24796
1982    3308    8147    1201    5249    20620
1983    1863    7338    900 4562    10015
1984    1527    5704    668 3801    10170

我的代码:

top_5.plot(kind = 'line', figsize=(10, 6)).legend(loc='center left', bbox_to_anchor=(1, 0.5))
plt.title('Top 5 Countries in Terms of Origin of Immigrants to Canada')
plt.xlabel('Year')
plt.ylabel('Number of Immigrants')
plt.show()

输出:

在此处输入图像描述

4

0 回答 0