proplot icon indicating copy to clipboard operation
proplot copied to clipboard

Wrong zorder of land background

Open zxdawn opened this issue 2 years ago • 1 comments

Description

If we plot the data first and then add the landcolor, the land will cover the data. It's better to set the land to the lowest zorder.

Steps to reproduce

import proplot as pplt
import numpy as np

offset = -40
lon = pplt.arange(offset, 360 + offset - 1, 60)
lat = pplt.arange(60, 70, 1)
state = np.random.RandomState(51423)
data = state.rand(len(lat), len(lon))

fig, axs = pplt.subplots(proj='npstere')
axs.pcolor(lon, lat, data, cmap='viridis')
axs.format(boundinglat=60, land=True, landcolor='gray5')

Expected behavior: Format axis before plot data:

axs.format(boundinglat=60, land=True, landcolor='gray5')
axs.pcolor(lon, lat, data, cmap='viridis')

image

Actual behavior: image

Proplot version

3.5.1
0.9.5.post202

zxdawn avatar Jun 03 '22 12:06 zxdawn

Note that the coast should be kept as the highest zorder.

zxdawn avatar Jun 03 '22 12:06 zxdawn