Skip to content

Commit a343a1c

Browse files
authored
Fix contours on global data plot (#654)
1 parent 9a3dbc4 commit a343a1c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

core/cartopy/cartopy.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,9 @@
652652
"source": [
653653
"Plotting data on a Cartesian grid is equivalent to plotting data in the PlateCarree projection, where meridians and parallels are all straight lines with constant spacing. As a result of this simplicity, the global datasets we use often begin in the PlateCarree projection.\n",
654654
"\n",
655-
"Once we create our map again, we can plot these data values as a contour map. We must also specify the `transform` keyword argument. This is an argument to a contour-plotting method that specifies the projection type currently used by our data. The projection type specified by this argument will be transformed into the projection type specified in the `subplot` method. Let's plot our data in the Mollweide projection to see how shapes change under a transformation."
655+
"Once we create our map again, we can plot these data values as a contour map. We must also specify the `transform` keyword argument. This is an argument to a contour-plotting method that specifies the projection type currently used by our data. The projection type specified by this argument will be transformed into the projection type specified in the `subplot` method. \n",
656+
"\n",
657+
"Let's plot our data in the Equal Earth global projection {cite:p}`10.1080/13658816.2018.1504949` to see how shapes change under a transformation."
656658
]
657659
},
658660
{
@@ -662,7 +664,7 @@
662664
"outputs": [],
663665
"source": [
664666
"fig = plt.figure(figsize=(11, 8.5))\n",
665-
"ax = plt.subplot(1, 1, 1, projection=projMoll)\n",
667+
"ax = plt.subplot(1, 1, 1, projection=ccrs.EqualEarth())\n",
666668
"ax.coastlines()\n",
667669
"dataplot = ax.contourf(lon, lat, data, transform=ccrs.PlateCarree())\n",
668670
"plt.colorbar(dataplot, orientation='horizontal');"
@@ -742,7 +744,7 @@
742744
"name": "python",
743745
"nbconvert_exporter": "python",
744746
"pygments_lexer": "ipython3",
745-
"version": "3.14.3"
747+
"version": "3.14.4"
746748
}
747749
},
748750
"nbformat": 4,

0 commit comments

Comments
 (0)