Here is the explanation for the preceding code:
- gl1 = ax1.gridlines(crs=ccrs.PlateCarree(), draw_labels=True, linewidth=2, color='gray', alpha=0.5, linestyle='--') defines the format of grid lines to be plotted:
- ccrs.PlateCarree() specifies the reference coordinate system (that is, the projection) to be used. In this case, we'll use the PlateCarree projection.
- draw_labels=True specifies that the ticks and tick labels aligned with the grid lines are to be plotted. By setting this parameter to False, you can switch them off.
- linewidth=2 specifies the width of the grid lines.
- color='gray' specifies the color of the grid lines.
- alpha=0.5 specifies the transparency of the grid lines.
- linestyle='--' specifies the style of the ...