pip install ggplot from ggplot import * theme_set(theme_bw()) world = map_data('world') p = ggplot() p = p + geom_polygon(data=world, aes(x='long', y='lat', group='group'), fill='white', color='black') p = p + xlim(-180, 180) p = p + ylim(-90, 90) p = p + theme(panel_background=element_rect(fill='white')) p = p + labs(x='Longitude', y='Latitude', title='World Map') print(p) python from ggplot import * theme_set(theme_bw()) world = map_data('world') p = ggplot() p = p + geom_polygon(data=world, aes(x='long', y='lat', group='group'), fill='white', color='black') p = p + xlim(-180, 180) p = p + ylim(-90, 90) p = p + theme(panel_background=element_rect(fill='white')) p = p + labs(x='Longitude', y='Latitude', title='World Map') print(p)


上一篇:
下一篇:
切换中文