[Bug]: Manually created markers for legends are vertically raised and have sharp edges
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python
- Área
- data-visualization
Línea de trabajo
Empieza por el manejo de marker y leyendas de Line2D utilizado por la reproducción, comparando el marker creado manualmente con el marker generado por scatter. Ejecuta el ejemplo de Python proporcionado e inspecciona la salida SVG; se considera terminado cuando los dos markers de la leyenda tienen la misma alineación vertical y bordes redondeados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug summary
If I use Line2D to manually create styles for legends, the entries slightly differ from organically generated ones:
- The marker is slightly raised.
- The marker’s edges are not rounded. Looking at an SVG output, this seems to be a simple style setting.
I have a context where I want to place these markers on a patch to emulate markers on a heatmap and here the slight offset is irritating as the triangles are touching the top of the patch, which they shouldn’t.
I would also appreciate any hints for an ad-hoc manual fix.
Code for reproduction
from matplotlib.pyplot import subplots
from matplotlib.lines import Line2D
fig, axes = subplots( figsize=(3,1) )
my_scatter = axes.scatter( [], [], marker="v", label="plotted" )
my_triangle = Line2D( [], [], linestyle="none", marker="v", label="manual" )
axes.legend( handles=[my_triangle,my_scatter], ncols=2 )
fig.savefig("marker_bug.svg")
Actual outcome
Expected outcome
Operating system
Arch
Matplotlib Version
3.11.0
Matplotlib Backend
qtagg
Python version
3.14.5
Installation
pip
- Lenguaje dominante
- Python
- Estrellas
- 23.5k
- Forks
- 8.6k
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 64
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 matplotlib/matplotlib
-
[Bug]: Saving a NonUniformImage with bbox_inches="tight" raises TypeError when extent is omittedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
matplotlib/matplotlib#32707 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: withTickedStroke raises ValueError when the line contains NaNPosiblemente ocupada @RjyavardhanSingh la tomó hace 3 días. Abiertofirst-contribution topic: path handling
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
matplotlib/matplotlib#32689 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Constrained layout raises ZeroDivisionError when the first height/width ratio is zeroPosiblemente ocupada @yqtian-se la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
matplotlib/matplotlib#32684 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Bug]: twin axes ignore the navigation opt-outsPosiblemente ocupada @NaumanRafay la tomó hace 36 días. Abiertotopic: toolbar
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
matplotlib/matplotlib#32528 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Bug]: macOS font discovery raises KeyError('_items') for an incomplete system_profiler font recordAbiertofirst-contribution OS: Apple status: needs clarification topic: text/fonts
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
matplotlib/matplotlib#32328 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de matplotlib/matplotlib
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
nael5x/creative-ai#130 ·
-
Make the "%" unit spacing the same in the web and in A10Posiblemente ocupada @kragent66-glitch la tomó hoy. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 comentario ·
-
ci severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TMHSDigital/Spackle#205 ·
Los mantenedores suelen responder en 1 día
-
pkg:lgm type:chore upstream-gaussx
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
jejjohnson/pyrox#610 ·
Los mantenedores suelen responder en 1 día