Cartopy: higher resolution for a large circle line

I am trying to build a large distance between two points. I found in the map documents (introductory_examples / 01.great_circle.html):

import matplotlib.pyplot as plt
import cartopy.crs as ccrs

ax = plt.axes(projection=ccrs.Robinson())

ax.set_global()

ax.coastlines()

plt.plot([-0.08, 132], [51.53, 43.17], color='red',      transform=ccrs.Geodetic())
plt.plot([-0.08, 132], [51.53, 43.17], color='blue', transform=ccrs.PlateCarree())

plt.show()

which creates the following image:

large circle example

The fact is that in my own work, two points are much closer to each other and in a different projection (although I think that is not important here). If I change this code to a line in a smaller area, for example:

import matplotlib.pyplot as plt
import cartopy.crs as ccrs

ax = plt.axes(projection=ccrs.Robinson())

ax.set_extent([-5, 55, 40, 55])

ax.coastlines()

plt.plot([-0.08, 50], [51.53, 43.17], color='red',      transform=ccrs.Geodetic())
plt.plot([-0.08, 50], [51.53, 43.17], color='blue', transform=ccrs.PlateCarree())

plt.show()

This makes the following image: shorter line

The red line of the big circle in this case looks crap, and it seems that it is because of too low a resolution. How to increase the number of points making up the line of the big circle?

+4
1

. , , :

class LowerThresholdRobinson(ccrs.Robinson):

    @property
    def threshold(self):
        return 1e3

LowerThresholdRobinson() ccrs.Robinson() , .

+8

Source: https://habr.com/ru/post/1658984/


All Articles