---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/warming/lib/python3.9/site-packages/matplotlib/axis.py in convert_units(self, x)
1499 try:
-> 1500 ret = self.converter.convert(x, self.units, self)
1501 except Exception as e:
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/warming/lib/python3.9/site-packages/nc_time_axis/__init__.py in convert(cls, value, unit, axis)
348 if not isinstance(first_value, (CalendarDateTime, cftime.datetime)):
--> 349 raise ValueError(
350 "The values must be numbers or instances of "
ValueError: The values must be numbers or instances of "nc_time_axis.CalendarDateTime" or "cftime.datetime".
The above exception was the direct cause of the following exception:
ConversionError Traceback (most recent call last)
/tmp/ipykernel_13716/2307464752.py in <module>
16 temperatures = [round(random.uniform(0, 12), 3) for _ in range(len(cdt))]
17
---> 18 plt.fill_between(cdt, temperatures,0)
19 plt.margins(0.1)
20 plt.ylim(0, 12)
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/warming/lib/python3.9/site-packages/matplotlib/pyplot.py in fill_between(x, y1, y2, where, interpolate, step, data, **kwargs)
2804 x, y1, y2=0, where=None, interpolate=False, step=None, *,
2805 data=None, **kwargs):
-> 2806 return gca().fill_between(
2807 x, y1, y2=y2, where=where, interpolate=interpolate, step=step,
2808 **({"data": data} if data is not None else {}), **kwargs)
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/warming/lib/python3.9/site-packages/matplotlib/__init__.py in inner(ax, data, *args, **kwargs)
1359 def inner(ax, *args, data=None, **kwargs):
1360 if data is None:
-> 1361 return func(ax, *map(sanitize_sequence, args), **kwargs)
1362
1363 bound = new_sig.bind(ax, *args, **kwargs)
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/warming/lib/python3.9/site-packages/matplotlib/axes/_axes.py in fill_between(self, x, y1, y2, where, interpolate, step, **kwargs)
5384 def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
5385 step=None, **kwargs):
-> 5386 return self._fill_between_x_or_y(
5387 "x", x, y1, y2,
5388 where=where, interpolate=interpolate, step=step, **kwargs)
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/warming/lib/python3.9/site-packages/matplotlib/axes/_axes.py in _fill_between_x_or_y(self, ind_dir, ind, dep1, dep2, where, interpolate, step, **kwargs)
5291 # Handle united data, such as dates
5292 ind, dep1, dep2 = map(
-> 5293 ma.masked_invalid, self._process_unit_info(
5294 [(ind_dir, ind), (dep_dir, dep1), (dep_dir, dep2)], kwargs))
5295
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/warming/lib/python3.9/site-packages/matplotlib/axes/_base.py in _process_unit_info(self, datasets, kwargs, convert)
2357 if dataset_axis_name == axis_name and data is not None:
2358 axis.update_units(data)
-> 2359 return [axis_map[axis_name].convert_units(data) if convert else data
2360 for axis_name, data in datasets]
2361
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/warming/lib/python3.9/site-packages/matplotlib/axes/_base.py in <listcomp>(.0)
2357 if dataset_axis_name == axis_name and data is not None:
2358 axis.update_units(data)
-> 2359 return [axis_map[axis_name].convert_units(data) if convert else data
2360 for axis_name, data in datasets]
2361
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/warming/lib/python3.9/site-packages/matplotlib/axis.py in convert_units(self, x)
1500 ret = self.converter.convert(x, self.units, self)
1501 except Exception as e:
-> 1502 raise munits.ConversionError('Failed to convert value(s) to axis '
1503 f'units: {x!r}') from e
1504 return ret
ConversionError: Failed to convert value(s) to axis units: [<CalendarDateTime: datetime=2017-02-01 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-02 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-03 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-04 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-05 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-06 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-07 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-08 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-09 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-10 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-11 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-12 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-13 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-14 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-15 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-16 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-17 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-18 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-19 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-20 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-21 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-22 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-23 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-24 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-25 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-26 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-27 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-28 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-29 00:00:00, calendar={self.calendar}>, <CalendarDateTime: datetime=2017-02-30 00:00:00, calendar={self.calendar}>]