xarray removes axis grid from pcolormesh
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- matplotlib, python
- Área
- data-visualization
Línea de trabajo
El informe identifica una regresión introducida por el commit 7ff2b04a9bfa5da86d23a0615dbb3ae6a84bde91, pero no menciona archivos ni pruebas. Empieza leyendo ese commit y siguiendo la ruta de trazado de xarray DataArray para pcolormesh. Compara la salida reproducida con plt.pcolormesh con axes.grid=True; el trabajo estará terminado cuando el trazado de xarray respete la configuración de la cuadrícula, incluida la cuadrícula menor.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
Introduced with
https://github.com/pydata/xarray/commit/7ff2b04a9bfa5da86d23a0615dbb3ae6a84bde91
for whatever reason.
It is inconsistent with matplotlib and makes styles that explicitly set a grid unusable. In addition, it only switches off the major grid, leaving the minor grid visible which makes the figures look even worse. I suggest to revert this commit.
What did you expect to happen?
The grid should be visible as set by the style or with rcParams.
Minimal Complete Verifiable Example
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "xarray[complete]@git+https://github.com/pydata/xarray.git@main",
# ]
# ///
#
# This script automatically imports the development branch of xarray to check for issues.
# Please delete this header if you have _not_ tested this script with `uv run`!
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
xr.show_versions()
# your reproducer code ...
x = np.random.random((3, 5))
plt.rcParams["axes.grid"] = True
# compare
plt.pcolormesh(x) # grid shown as expected
# vs
xr.DataArray(x).plot() # no grid
Steps to reproduce
No response
MVCE confirmation
- Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
- Complete example — the example is self-contained, including all data and the text of any traceback.
- Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
- New issue — a search of GitHub Issues suggests this is not a duplicate.
- Recent environment — the issue occurs with the latest version of xarray and its dependencies.
Relevant log output
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
commit: None
python: 3.13.16 | packaged by conda-forge | (main, Oct 13 2026, 16:57:20) [GCC 15.3.0]
python-bits: 64
OS: Linux
OS-release: 6.12.115+deb13.1-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: C.UTF-8
LOCALE: ('C', 'UTF-8')
libhdf5: 2.1.0
libnetcdf: 4.10.1
xarray: 2026.7.0
pandas: 3.0.6
numpy: 2.5.4
scipy: 1.18.1
netCDF4: 1.7.4
pydap: None
h5netcdf: 1.8.1
h5py: 3.16.0
zarr: 3.4.1
cftime: 1.6.5
nc_time_axis: 1.4.1
iris: None
bottleneck: 1.6.0
dask: 2026.8.0
distributed: 2026.8.0
matplotlib: 3.11.2
cartopy: 0.26.0
seaborn: None
numbagg: None
fsspec: 2026.9.0
cupy: None
pint: None
sparse: None
flox: 9.11
numpy_groupies: 0.14.2
setuptools: 84.0.0
pip: 26.2.2
conda: 26.9.3
pytest: 9.1.1
mypy: None
IPython: 9.17.1
sphinx: 9.1.1
- Lenguaje dominante
- Python
- Estrellas
- 4.2k
- Forks
- 1.5k
- Merge medio
- 2 d 21 h
- PR fusionados (30 d)
- 74
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pydata/xarray
-
`DataTree.map_over_datasets` behavior can be obscure sometimesPosiblemente ocupada @mohansree14 la tomó hace 24 días. Abiertoneeds triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pydata/xarray#11813 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Comparing attrs that contain a dict of NumPy arrays raises ValueError in identical / assert_identicalPosiblemente ocupada @SohamXYZDev la tomó hace 29 días. Abiertobug needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
pydata/xarray#11777 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
RangeIndex` with datetime64 bounds cannot be printed (`Unknown format code 'g'`)Posiblemente ocupada @d-chambers la tomó hace 60 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pydata/xarray#11598 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
DataTree constructor error message says dict even though dict is not acceptedPosiblemente ocupada @aryansk la tomó hace 100 días. Abiertobug contrib-good-first-issue topic-DataTree topic-error reporting
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pydata/xarray#11514 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
needs triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
pydata/xarray#10800 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de pydata/xarray
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
abetlen/llama-cpp-python#2424 ·
Los mantenedores suelen responder en 1 día
-
Bug IronPython Python 3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pyrevitlabs/pyRevit#4184 ·
Los mantenedores suelen responder en 1 día
-
CLAW (Agents & Orchestration)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
jqueryscript/awesome-claude-code#1009 ·
-
tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día