KeyError when trying to plot matplotlib subplots after update

Viewed 1397

after the recent ubuntu update I can't plot subplots in matplotlib anymore. Not exactly sure what was updated and causes this. My versions are ubuntu 17.04, matplotlib 2.0.0, python 2.7. Does anyone have an idea what could be the reason?

I simply tried:

from matplotlib import pyplot as plt
fig, axs = plt.subplots(3,3)

which results in:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 1212, in subplots
    ax0 = fig.add_subplot(gs[0, 0], **subplot_kw)
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1020, in add_subplot
    a = subplot_class_factory(projection_class)(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_subplots.py", line 73, in __init__
    self._axes_class.__init__(self, fig, self.figbox, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 529, in __init__
    self._init_axis()
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 625, in _init_axis
    self.yaxis = maxis.YAxis(self)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 676, in __init__
    self.cla()
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 760, in cla
    self.reset_ticks()
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 774, in reset_ticks
    self.majorTicks.extend([self._get_tick(major=True)])
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 2057, in _get_tick
    return YTick(self.axes, 0, '', major=major, **tick_kw)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 148, in __init__
    self.apply_tickdir(tickdir)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 512, in apply_tickdir
    self._pad = self._base_pad + self.get_tick_padding()
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 184, in get_tick_padding
    return self._size * padding[self._tickdir]
KeyError: u'our
1 Answers
Related