Python世界地图

电脑技术 电脑技术 1360 人阅读 | 0 人回复 | 2022-04-15

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
import pygal
  
# create a world map
worldmap =  pygal.maps.world.World()
  
# set the title of the map
worldmap.title = 'Countries'
  
# adding the countries
worldmap.add('Random Data', {
        'aq' : 10,
        'cd' : 30,
        'de' : 40,
        'eg' : 50,
        'ga' : 45,
        'hk' : 23,
        'in' : 70,
        'jp' : 54,
        'nz' : 41,
        'kz' : 32,
        'us' : 66
})
  
# save into the file
worldmap.render_to_file('abc.svg')
  
print("Success")
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

热门推荐