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

How to generate line graph from numpy arrays #1

Open
sandorkertesz opened this issue Dec 2, 2023 · 0 comments
Open

How to generate line graph from numpy arrays #1

sandorkertesz opened this issue Dec 2, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sandorkertesz
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

I tried to call "line()" in different ways but all failed. E.g.:

import earthkit.plots
import numpy as np
x = np.array([0,1,2,3])
y = np.array([5,6,7,8])
fig = earthkit.plots.line(x=x, y=y)
fig.show()

fails with:

Cannot find a wrapper for class: builtins.NoneType, returning unwrapped object
...
File ~/git/earthkit-plots/earthkit/plots/inputs.py:57, in xarray(self, data, args, kwargs)
     55 else:
     56     try:
---> 57         dataset = earthkit.data.from_object(data).to_xarray().squeeze()
     58     except (NotImplementedError, ValueError):
     59         return None

AttributeError: 'NoneType' object has no attribute 'to_xarray'

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Organisation

ECMWF

@sandorkertesz sandorkertesz added the enhancement New feature or request label Dec 2, 2023
@sandorkertesz sandorkertesz changed the title How generate line graph from numpy arrays How to generate line graph from numpy arrays Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants