[python-users] metpy.plots.SkewT AttributeError in Fedora 35 / matplotlib-3.5.0

Just installed Fedora 35, which uses matplotlib-3.5.0 (and python 3.10),
and metpy.plots.SkewT returns :

AttributeError: 'Line2D' object has no property ''. Did you mean:
'minorTicks'?

Full trace :

$ python /tmp/skewt.py --skewtsonde oak
> Traceback (most recent call last):
>   File "/tmp/skewt.py", line 1391, in <module>
>     sys.exit(main())
>   File "/tmp/skewt.py", line 1387, in main
>     plot0(parser.parse_args())
>   File "/tmp/skewt.py", line 1231, in plot0
>     subplot_skewt(fig0, 111, vtime0, args0) # skewt
>   File "/tmp/skewt.py", line 890, in subplot_skewt
>     skewt1 = metpy.plots.SkewT(fig0, subplot=pos0) #, rotation = 0)
>   File
> "/home/kjh/toolroot.d/pythonuserbase.d/lib/python3.10/site-packages/metpy/plots/skewt.py",
> line 316, in __init__
>     self.ax = fig.add_subplot(*subplot, projection='skewx',
> rotation=rotation)
>   File "/usr/lib64/python3.10/site-packages/matplotlib/figure.py", line
> 774, in add_subplot
>     ax = subplot_class_factory(projection_class)(self, *args, **pkw)
>   File "/usr/lib64/python3.10/site-packages/matplotlib/axes/_subplots.py",
> line 33, in __init__
>     self._axes_class.__init__(self, fig, [0, 0, 1, 1], **kwargs)
>   File
> "/home/kjh/toolroot.d/pythonuserbase.d/lib/python3.10/site-packages/metpy/plots/skewt.py",
> line 195, in __init__
>     super().__init__(*args, **kwargs)
>   File
> "/usr/lib64/python3.10/site-packages/matplotlib/_api/deprecation.py", line
> 456, in wrapper
>     return func(*args, **kwargs)
>   File "/usr/lib64/python3.10/site-packages/matplotlib/axes/_base.py",
> line 632, in __init__
>     self.cla()
>   File "/usr/lib64/python3.10/site-packages/matplotlib/axes/_base.py",
> line 1249, in cla
>     self.grid(False)  # Disable grid on init to use rcParameter
>   File
> "/usr/lib64/python3.10/site-packages/matplotlib/_api/deprecation.py", line
> 299, in wrapper
>     return func(*args, **kwargs)
>   File "/usr/lib64/python3.10/site-packages/matplotlib/axes/_base.py",
> line 3226, in grid
>     self.xaxis.grid(visible, which=which, **kwargs)
>   File
> "/usr/lib64/python3.10/site-packages/matplotlib/_api/deprecation.py", line
> 299, in wrapper
>     return func(*args, **kwargs)
>   File "/usr/lib64/python3.10/site-packages/matplotlib/axis.py", line
> 1434, in grid
>     self.set_tick_params(which='major', **gridkw)
>   File "/usr/lib64/python3.10/site-packages/matplotlib/axis.py", line 873,
> in set_tick_params
>     for tick in self.majorTicks:
>   File "/usr/lib64/python3.10/site-packages/matplotlib/axis.py", line 592,
> in __get__
>     tick = instance._get_tick(major=True)
>   File
> "/home/kjh/toolroot.d/pythonuserbase.d/lib/python3.10/site-packages/metpy/plots/skewt.py",
> line 134, in _get_tick
>     return SkewXTick(self.axes, None, label=None, major=major)
>   File "/usr/lib64/python3.10/site-packages/matplotlib/axis.py", line 415,
> in __init__
>     super().__init__(*args, **kwargs)
>   File "/usr/lib64/python3.10/site-packages/matplotlib/axis.py", line 160,
> in __init__
>     self.gridline = mlines.Line2D(
>   File "/usr/lib64/python3.10/site-packages/matplotlib/lines.py", line
> 393, in __init__
>     self.update(kwargs)
>   File "/usr/lib64/python3.10/site-packages/matplotlib/artist.py", line
> 1064, in update
>     raise AttributeError(f"{type(self).__name__!r} object "
> AttributeError: 'Line2D' object has no property ''. Did you mean:
> 'minorTicks'?
  • 2021 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the python-users archives: