plotparallels()/plotmeridians() only support xoffset or yoffset not both and do not support horizontalalignment or verticalalignment

Abierto
#325 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

Localiza las implementaciones de plotparallels() y plotmeridians() y sigue cómo se gestionan xoffset, yoffset y kwargs. Verifica el comportamiento con etiquetas en ambos lados del mapa: ambos offsets deberían funcionar conjuntamente, y horizontalalignment y verticalalignment deberían aceptarse. Se considera terminado cuando los llamadores ya no necesiten modificar los objetos matplotlib devueltos para esta colocación.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

plotparallels() and plotmeridians() only support xoffset or yoffset not both.

plotparallels() and plotmeridians() do not support horizontalalignment or verticalalignment via kwargs as these are hard coded within Basemap.

I found both of these because I wanted the labels inside the map border with the parallels above the line at the right of the plot and the meridians to the right of the line at the bottom of the plot. I found a hack by altering the returned matplotlib objects:

meridians = bmap.drawmeridians(meridians,labels=[0,0,1,0],fontsize=10,
                               color='gray', yoffset=-abs(right-left)
for k, v in meridians.iteritems():
    v[1][0].set_horizontalalignment('left')

This sets the label to the top but then moving them the size of the plot then setting horizontal alignment via returned matplotlib object.

Lenguaje dominante
Python
Estrellas
817
Forks
395
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de matplotlib/basemap

Todos los issues de matplotlib/basemap

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.