Meteoinfolab Script Example: Add South Sea Foot map

Source: Internet
Author: User

Adding the South Sea foot map is actually adding a map coordinate system (AXESM), you can specify the position parameter (i.e. position and size) when creating a map coordinate system with the AXESM function, the 1th and 2nd parameters are the lower left X, y position of the coordinate system, and the last two parameters are the width and height of the coordinate system. Units are the normalized coordinates (0-1) of the figure. Because the map coordinate system needs to maintain the map x when the figure is scaled, the y-coordinate scale is the same (the map does not deform), the position of the coordinate system is drawn with the figure scaling, you need to set the figure size in advance, and then adjust the position parameter.

Script Program:

#Set Data FoldersBasedir ='D:/myprogram/distribution/java/meteoinfo/meteoinfo'Mapdir= Os.path.join (Basedir,'Map')#Read shape FilesBou2_layer = Shaperead (Os.path.join (Mapdir,'bou2_4p.shp')) Bou1_layer= Shaperead (Os.path.join (Mapdir,'bou1_4l.shp')) River_layer= Shaperead (Os.path.join (Mapdir,'rivers.shp')) City_layer= Shaperead (Os.path.join (Mapdir,'res1_4m.shp'))#Plotaxesm () geoshow (Bou2_layer, Edgecolor='Lightgray') geoshow (Bou1_layer, Facecolor= (0,0,255)) SS= Makesymbolspec (' Line', {'value':'Yangtze','Color':(0,255,255),'size': 1},     {'value':'Huang He','Color':(0,255,255),'size': 1}, field='NAME') geoshow (River_layer, Symbolspec=ss) Geoshow (City_layer, Facecolor='R', Size=4, labelfield='NAME', Fontname=u'italics', Fontsize=16, yoffset=15) Xlim (72, 136) Ylim (16, 55)#ADD South China SeaSc_layer = Shaperead (Os.path.join (Mapdir,'bou1_4l.shp')) Axesm (position=[0.14,0.18,0.15,0.2], axison=False) geoshow (Sc_layer, Facecolor= (0,0,255)) Xlim (106, 123) Ylim (2, 23)

Operation Result:

Meteoinfolab Script Example: Add South Sea Foot map

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.