matplotlib / matplotlib/basemap
basemap plot the opposite longitudinal section
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 817
- Forks
- 395
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I'm getting nothing from stackoverflow so I post it here.
The problem is I can't let `bluemarble` to plot a map showing the Indo-Pacific longitudinal section, covering the longitude band of about [60,190]. Below is my code:
```
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
lats=[-25,66]
lons=[60,187]
fig=plt.figure();ax=fig.add_subplot(111)
bmap=Basemap(projection='merc',\
llcrnrlat=lats[0],llcrnrlon=lons[0],\
urcrnrlat=lats[1],urcrnrlon=lons[1]-360.,\
lon_0=(lons[0]+lons[1])/2.,\
ax=ax)
bmap.bluemarble()
plt.show()
```
The result has its x-axis flipped, I guess somehow related to this [issue#192](https://github.com/matplotlib/basemap/issues/192)
If I swap the llcrnrlon and urcrnrlon:
```
bmap=Basemap(projection='merc',\
llcrnrlat=lats[0],llcrnrlon=lons[1]-360.,\
urcrnrlat=lats[1],urcrnrlon=lons[0],\
lon_0=(lons[0]+lons[1])/2.,\
ax=ax)
```
the map shows correct orientation, but the wrong domain. I wanted to show the Indian ocean, Euro-asia and west Pacific, however the map shows the remaining longitudes, covering the central-east Pacific, America continents and Atlantic. The lon_0 argument doesn't seem to do anything.
I am aware that when crossing the dateline things get complicated and sometimes you need to `shiftgrid()` or `shiftdata()`, but in this case I have no data yet, just the bluemarble background.
Please help.
Some versions (all in conda with python2.7):
basemap=1.0.7=np111py27_0
matplotlib=2.0.0=np111py27_0
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Reproduisez le code signalé avec Basemap 1.0.7 et matplotlib 2.0.0, en utilisant les limites de longitude [60,190] et l’arrière-plan bluemarble. Commencez par vérifier comment les limites de Mercator et lon_0 sont gérées lors du franchissement de la ligne internationale de changement de date ; le travail est terminé lorsque la section Indo-Pacifique s’affiche avec l’orientation et le domaine demandés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100