Skip to content

Commit

Permalink
pcolormesh grid deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Bailey authored and Stephen Bailey committed Dec 11, 2021
1 parent db67f80 commit f04985c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion py/desiutil/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,11 @@ def plot_grid_map(data, ra_edges, dec_edges, cmap='viridis', colorbar=True,
# Build a 2D array of grid line intersections.
grid_ra, grid_dec = np.meshgrid(proj_ra, ax.projection_dec(dec_edges))

ax.grid(False)
mesh = ax.pcolormesh(grid_ra, grid_dec,
data, cmap=cmap, norm=norm, edgecolor='none', lw=0)

# pcolormesh turns the grid off, turn it back on.
# grid turned off for pcolormesh; turn it back on.
ax.grid(True)

if colorbar:
Expand Down

0 comments on commit f04985c

Please sign in to comment.