# Map projections for each quadrant of the globe

I am using an xarray data and matplotlib to plot it before export

This is the xarr data used

``````<xarray.DataArray 't2m' (latitude: 361, longitude: 720)>
array([[273.9, 273.9, 273.9, ..., 273.9, 273.9, 273.9],
[274.1, 274.1, 274.1, ..., 274.1, 274.1, 274.1],
[274.5, 274.5, 274.5, ..., 274.5, 274.5, 274.5],
...,
[220.6, 220.6, 220.6, ..., 220.6, 220.6, 220.6],
[221.6, 221.6, 221.6, ..., 221.6, 221.6, 221.6],
[223. , 223. , 223. , ..., 223. , 223. , 223. ]], dtype=float32)
Coordinates:
* latitude    (latitude) float64 90.0 89.5 89.0 88.5 ... -89.0 -89.5 -90.0
* longitude   (longitude) float64 -180.0 -179.5 -179.0 ... 178.5 179.0 179.5
step        timedelta64[ns] 03:00:00
valid_time  datetime64[ns] 2020-09-14T03:00:00
Attributes:
standard_name:  air_temperature

``````

The longitude range is from -180 to +180. If I use the below data with projections the image produced is correct.

``````import xarray as xr
import matplotlib.pyplot as plt
import cartopy.crs as ccrs

imgDpi = 100
fig = plt.figure(figsize=(512/imgDpi, 512/imgDpi), dpi=imgDpi) #to convert from inches to px
ax.imshow(xarr, transform=ccrs.PlateCarree(), origin='upper', cmap='viridis')
ax.axis('off')
plt.show()
fig.savefig('unsliced.png', format="png", transparent=True, dpi=imgDpi)

``````

But if I slice the data into four quadrants and plot, there is an issue with projection

``````topLeft = xarr.sel(longitude=slice(-180, 0), latitude=slice(90, 0))
topRight = xarr.sel(longitude=slice(0, 180), latitude=slice(90, 0))
bottomLeft = xarr.sel(longitude=slice(-180, 0), latitude=slice(0, -90))
bottomRight = xarr.sel(longitude=slice(0, 180), latitude=slice(0, -90))

axTL.imshow(topLeft, transform=ccrs.PlateCarree(), origin='upper', cmap='viridis')
axTL.axis('off')

axTR.imshow(topRight, transform=ccrs.PlateCarree(), origin='upper', cmap='viridis')
axTR.axis('off')

axBL.imshow(bottomLeft, transform=ccrs.PlateCarree(), origin='upper', cmap='viridis')
axBL.axis('off')

axBR.imshow(bottomRight, transform=ccrs.PlateCarree(), origin='upper', cmap='viridis')
axBR.axis('off')

``````

``````globe_w = ccrs.Globe(datum="WGS84",ellipse="WGS84")