Skip to content
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

Support variety of data inputs for wind barbs #662

Merged
merged 3 commits into from
Jul 19, 2023
Merged

Support variety of data inputs for wind barbs #662

merged 3 commits into from
Jul 19, 2023

Conversation

ahuang11
Copy link
Collaborator

@ahuang11 ahuang11 commented Jul 7, 2023

Based on feedback from
holoviz/holoviews#5797

@jbednar jbednar changed the title Support variety of data inputs Support variety of data inputs for wind barbs Jul 8, 2023
Copy link
Member

@hoxbro hoxbro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should add an extra test where vdims is [hv.Dimension("u"), hv.Dimension("v")].

I don't know if this will give any problems but using hv.Dataset will flatten the array. I can see you already have flattened the result array because of this.

import numpy as np
import holoviews as hv

x = np.array([-1, 1])
X, Y = np.meshgrid(x, x)
U, V = 10 * X, 2 * Y
U

ds = hv.Dataset((X, Y, U, V), kdims=["x", "y"], vdims=["u", "v"])
ds.dimension_values("u")

image

geoviews/element/geo.py Outdated Show resolved Hide resolved
geoviews/element/geo.py Show resolved Hide resolved
geoviews/tests/plotting/mpl/test_chart.py Outdated Show resolved Hide resolved
@ahuang11
Copy link
Collaborator Author

I don't think the flattening matters. It'll still plot to the same coord point.
image

@ahuang11 ahuang11 requested a review from hoxbro July 10, 2023 16:05
Copy link
Member

@hoxbro hoxbro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us keep this PR open to sync if more changes are added in holoviz/holoviews#5797.

@hoxbro hoxbro merged commit 7fa6484 into main Jul 19, 2023
10 checks passed
@hoxbro hoxbro deleted the barbs_dims branch July 19, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants