In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "Python how to use the matplotlib toolkit to map the world", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Python how to use the matplotlib toolkit to map the world"!
1. Installation
In order to run the project smoothly, you need to install the following dependencies and enter the following command in cmd or Terminal:
Pip install numpypip install matplotlib
In order to use mpl_toolkits, simply installing matplotlib is not enough. We also need to install basemap separately. If you have already installed Anaconda, this step is very easy. Enter the following command to install it:
Conda install basemap
If not, it's a little more troublesome:
1. Install geos:
Pip install geos
two。 Download basemap based on your Python version
Http://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap
Note that the number after cp is the version of Python. (press ctrl+F on the page and enter basemap for quick positioning)
3. Go to the directory of the file under cmd and run
Pip install basemap-1.2.1-cp37-cp37m-win_amd64.whl2. Simple map
Let's start drawing an earth with the center pointing to China:
The effect is not bad, not only that, it is not just an image, it is also a fully functional matplot canvas. This means that you can draw a line on it! Let's enlarge the map, enter the Chinese area, and then mark the location of Shenzhen:
Don't use the blue background picture, it's not very clear, let's change it to an embossed one:
Thank you for your reading, the above is the content of "Python how to use the matplotlib toolkit to map the world". After the study of this article, I believe you have a deeper understanding of how Python uses the matplotlib toolkit to map the world. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.