matplotlib / matplotlib/basemap
Is basemap.rotate_vector working correctly?
- Dominant language
- Python
- Stars
- 817
- Forks
- 395
- PR merge metrics
- No merged PRs in 30d
Description
I have another indication that there might be something wrong in case of the rotpole projection, I'll try to make an example with that, later when I have some time. But for now please see the example below, should those to arrows be identical in this projection? (red is the rotated one and green is the original one) ...

``` python
import numpy as np
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
u = np.array([0.5, ])
v = np.array([0.5, ])
lon = -84
lat = 45
lon = np.array([lon, ])
lat = np.array([lat, ])
b = Basemap(lon_0=0)
urot, vrot = b.rotate_vector(u, v, lon, lat)
xx, yy = b(lon, lat)
b.quiver(xx, yy, urot, vrot, color="r")
b.quiver(xx, yy, u, v, color="g")
b.drawcoastlines()
```
Cheers
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the provided Python reproduction and the Basemap.rotate_vector entry point, using the lon=-84 and lat=45 vectors shown. Run the example and inspect the returned components and plotted arrows for the stated projection. Done means establishing whether the arrows should match and documenting or correcting the behavior with a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100