iamsaswata / imdlib

Download and process binary IMD meteorological data in Python
https://imdlib.readthedocs.io
MIT License
30 stars 16 forks source link

ValueError: Dataset.plot cannot be called directly. Use an explicit plot method #13

Closed bkowshik closed 3 years ago

bkowshik commented 3 years ago

Thank you for the tutorial but I could not get the visualisation working.

# Python version.
Python 3.7.10

>>> xr_objecct.mean('time').plot()

ValueError                                Traceback (most recent call last)
<ipython-input-50-befe6e3c72d0> in <module>
----> 1 xr_objecct.mean('time').plot()

/usr/local/lib/python3.7/site-packages/xarray/plot/dataset_plot.py in __call__(self, *args, **kwargs)
    185     def __call__(self, *args, **kwargs):
    186         raise ValueError(
--> 187             "Dataset.plot cannot be called directly. Use "
    188             "an explicit plot method, e.g. ds.plot.scatter(...)"
    189         )

ValueError: Dataset.plot cannot be called directly. Use an explicit plot method, e.g. ds.plot.scatter(...)
bkowshik commented 3 years ago

But, was able to get this working following the documentation. Thank you.

iamsaswata commented 3 years ago

Good to know that you have found the solution. You can find the latest instructions for imdlib @IMDLIB readthedocs website.