1 | initial version |
To plot data using Gaussian coordinates in Cartopy, you can follow the steps below:
cartopy.crs.Gaussian
.import cartopy.crs as ccrs
import cartopy.feature as cfeature
# Define projection using Gaussian coordinates
proj = ccrs.Gaussian(latitude_of_projection_origin=0, longitude_of_central_meridian=0)
GeoAxes
object with a projection set to the Gaussian projection.import matplotlib.pyplot as plt
fig = plt.figure(figsize=(8, 8))
ax = fig.add_subplot(1, 1, 1, projection=proj)
plot
method on the GeoAxes
object.# Example data array
data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
# Plot data using projection coordinates
ax.plot(data)
# Add coastlines to map
ax.add_feature(cfeature.COASTLINE)
# Add gridlines to map
gl = ax.gridlines(draw_labels=True)
gl.xlabels_top = False
gl.ylabels_right = False
plt.show()
.plt.show()