cartopy

Drawing lines between cartopy axes

隐身守侯 提交于 2021-02-18 03:36:57
问题 I have drawn two sets of axes which overlap, one being a zoomed version of the other. I want to draw lines between the corners of the zoomed axes and the corners of the rectangle it represents on the larger axes. However, the lines I'm drawing are slightly off position. I've tried to condense this into a simple example: import cartopy.crs as ccrs import matplotlib.pyplot as plt # Create a large figure: fig = plt.figure(figsize=(10, 10)) # Add an axes set and draw coastlines: ax1 = plt.axes([0

Drawing lines between cartopy axes

点点圈 提交于 2021-02-18 03:36:47
问题 I have drawn two sets of axes which overlap, one being a zoomed version of the other. I want to draw lines between the corners of the zoomed axes and the corners of the rectangle it represents on the larger axes. However, the lines I'm drawing are slightly off position. I've tried to condense this into a simple example: import cartopy.crs as ccrs import matplotlib.pyplot as plt # Create a large figure: fig = plt.figure(figsize=(10, 10)) # Add an axes set and draw coastlines: ax1 = plt.axes([0

Drawing lines between cartopy axes

不羁的心 提交于 2021-02-18 03:36:09
问题 I have drawn two sets of axes which overlap, one being a zoomed version of the other. I want to draw lines between the corners of the zoomed axes and the corners of the rectangle it represents on the larger axes. However, the lines I'm drawing are slightly off position. I've tried to condense this into a simple example: import cartopy.crs as ccrs import matplotlib.pyplot as plt # Create a large figure: fig = plt.figure(figsize=(10, 10)) # Add an axes set and draw coastlines: ax1 = plt.axes([0

Color Cartopy map countries according to given values

自古美人都是妖i 提交于 2021-02-11 07:11:31
问题 I am speaking to those who know Cartopy well ... because I use Cartopy to produce a map, but I do not know very well how it works. First, I created a map of Europe (in the broadest sense, from the Atlantic to the Urals), as shown in the attached figure. Then, I have a separate file, say dft0 , indicating for each European country the time of appearance ( Time0 ) of a certain phenomenon, counted in number of days with respect to an arbitrary date D and sorted from min to max ; as an example of

Color Cartopy map countries according to given values

不问归期 提交于 2021-02-11 07:10:52
问题 I am speaking to those who know Cartopy well ... because I use Cartopy to produce a map, but I do not know very well how it works. First, I created a map of Europe (in the broadest sense, from the Atlantic to the Urals), as shown in the attached figure. Then, I have a separate file, say dft0 , indicating for each European country the time of appearance ( Time0 ) of a certain phenomenon, counted in number of days with respect to an arbitrary date D and sorted from min to max ; as an example of

makegrid equivalent in cartopy, moving from basemap to cartopy

老子叫甜甜 提交于 2021-02-11 05:33:36
问题 So, I have been using Basemap for years in Python 2.7, I am moving to Python3.7 and would like to move to cartopy. I work with a lot of data where I have the projection info but I don't have lat and lon grids of the data. This is how I would handle things in Basemap. m=Basemap( llcrnrlon=-118.300, llcrnrlat=20.600, urcrnrlon=-58.958, urcrnrlat=51.02, projection='lcc', lat_1=38., lat_2=38., lon_0=-95., resolution ='l', area_thresh=1000. ) mwidth = 1008 #for 163 5km AWIPS2 grid mheight = 722

How can emulate transform_vector of basemap in cartopy

大憨熊 提交于 2021-02-10 17:34:25
问题 I want to utilize basemap's transform_vector function and its ability to return x and y, in cartopy to plot barbs This is the code in basemap u1, v1, x1, y1 = bm.transform_vector(u, v, self.lons, self.lats, 16, 16, returnxy=True) bm.barbs(x1, y1, u1, v1, barbcolor='firebrick', flagcolor='firebrick', pivot='middle', linewidths=1) I want to achieve this in cartopy but transform_vectors in cartopy does not have option to returnxy, so how can I do this? Assume we already have u, v, self.lons and

Cartopy: Can't plot vector field with uncertainties (and related questions)

喜你入骨 提交于 2021-02-08 05:24:13
问题 I've been trying for a while now to plot vector field with uncertainty ellipses in Cartopy. The idea is that if I have a location (lat/lon) and a vector (wind speed, for example), but that vector has an uncertainty (measured in standard deviation, for example), then I'd like to plot an ellipses around the tip of the arrow indicating that uncertainty. In GMT, psvelo does the trick, my goal is something like this. This is the same question as has been asked before here - I'm reopening it

Cartopy: Can't plot vector field with uncertainties (and related questions)

做~自己de王妃 提交于 2021-02-08 05:24:09
问题 I've been trying for a while now to plot vector field with uncertainty ellipses in Cartopy. The idea is that if I have a location (lat/lon) and a vector (wind speed, for example), but that vector has an uncertainty (measured in standard deviation, for example), then I'd like to plot an ellipses around the tip of the arrow indicating that uncertainty. In GMT, psvelo does the trick, my goal is something like this. This is the same question as has been asked before here - I'm reopening it

contourf in 3D Cartopy

。_饼干妹妹 提交于 2021-02-07 08:55:49
问题 I am looking for help in plotting a (variable) number of filled contours onto a 3D plot. The rub is that the points need to be correctly geo-referenced. I have got the 2D case working, using Cartopy, but one can not simply use mpl_toolkits.mplot3d , since one can only pass one projection into the figure() method. This question was useful, but is focused mostly on plotting a shapefile, while I have all the points and the values at each point for use in the contouring. This question also looked