-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add VectorField/WindBarbs project operation #296
Conversation
philippjfr
commented
Feb 10, 2019
- Fixes VectorField does not reproject angle #295
3672a37
to
d109351
Compare
As usual, terrific response time! I believe you made a mistake in the calculation of us, vs from the angle, see my commit: project_vectors...poplarShift:project_vectors Your fix seems fine otherwise. It does change the values of the angles though that get fed into the color mapping, so it's not ideal, but a good step in the right direction. |
Thanks for the fixes. I think the coloring issue is to do with the magnitudes being transformed but the color range being computed before the transformation. I'll think about how best to fix that. |
I think this is ready for review. |
Setting pivot='tail' vectorfield = (
gv.VectorField(
(X, Y, angle, magnitude), label="Vector Field", crs=ccrs.PlateCarree()
).opts(
global_extent=True,
projection=ccrs.Orthographic(),
magnitude="Magnitude",
show_legend=False,
pivot="tail",
)
* gv.feature.coastline()
)
pn.Row(
pn.pane.Matplotlib(fig, dpi=180, width=400, height=400),
pn.panel(vectorfield, width=300, height=300),
) |
All set. |