Source : http://en.wikipedia.org/wiki/List_of_languages_by_total_number_of_speakers
Numbers of locutors in millions.
Source : http://en.wikipedia.org/wiki/List_of_languages_by_total_number_of_speakers
Numbers of locutors in millions.
| #!/usr/bin/env python | |
| # -*- coding:utf8 -*- | |
| from matplotlib import pyplot as plt | |
| data_locutors = { | |
| 'Standard Chinese': 1151, | |
| 'English': 1000, | |
| 'Spanish': 500, | |
| 'Hindi': 490, | |
| 'Russian': 277, | |
| 'Arabic': 255, | |
| 'Portuguese': 240, | |
| 'Bengali': 215, | |
| 'French': 200, | |
| 'Malay/Indonesian': 175, | |
| 'German': 166, | |
| 'Japanese': 132, | |
| 'Farsi (Persian)': 110, | |
| 'Urdu': 104, | |
| 'Punjabi': 103 | |
| } | |
| numbers = [] | |
| langs = sorted(data_locutors, key=data_locutors.get) | |
| for k in langs: | |
| numbers.append(data_locutors[k]) | |
| plt.pie(numbers, labels=langs, colors=('r','g','b')) | |
| plt.title("Number of locutors per languages\n(source : WP)") | |
| plt.savefig("{}.png".format(__file__.split('.')[0])) |