ValueError: stretch is invalid #2006

merged 1 commit into from May 15, 2013


None yet
4 participants

mdboom commented May 15, 2013

On current master

import matplotlib.pyplot as plt

fig, ax = plt.subplots()

results in

Traceback (most recent call last):
  File "", line 19, in <module>
    fig, ax = plt.subplots()
  File "/scratch/matplotlib/lib/matplotlib/", line 1034, in subplots
    ax0 = fig.add_subplot(nrows, ncols, 1, **subplot_kw)
  File "/scratch/matplotlib/lib/matplotlib/", line 914, in add_subplot
    a = subplot_class_factory(projection_class)(self, *args, **kwargs)
  File "/scratch/matplotlib/lib/matplotlib/", line 9225, in __init__
    self._axes_class.__init__(self, fig, self.figbox, **kwargs)
  File "/scratch/matplotlib/lib/matplotlib/", line 450, in __init__
  File "/scratch/matplotlib/lib/matplotlib/", line 507, in _init_axis
    self.xaxis = maxis.XAxis(self)
  File "/scratch/matplotlib/lib/matplotlib/", line 645, in __init__
    self.label = self._get_label()
  File "/scratch/matplotlib/lib/matplotlib/", line 1615, in _get_label
  File "/scratch/matplotlib/lib/matplotlib/", line 689, in __init__
  File "/scratch/matplotlib/lib/matplotlib/", line 872, in set_stretch
    raise ValueError("stretch is invalid")
ValueError: stretch is invalid

Maybe this is related to commit cc61700


pelson commented May 15, 2013

Thanks for reporting. I can't reproduce this - have you changed any values in rcParams? Did you re-build matplotlib when updating?

I've marked this as a 1.3.x release blocker as I think we need to get to the bottom of this before we can continue with the release.

bmu commented May 15, 2013

My mplrc is here. There are some changes. However everything worked fine up to today when I pulled the current master.


pelson commented May 15, 2013

Thanks @bmu - I've commented on the commit where I think a bug was introduced.


mdboom commented May 15, 2013

@bmu: Can you confirm the attached patch resolves your issue?

bmu commented May 15, 2013

yup, thist solves the issue. Thanks

mdboom added a commit that referenced this pull request May 15, 2013

@mdboom mdboom merged commit ab5a141 into matplotlib:master May 15, 2013

1 check passed

default The Travis CI build passed

@mdboom mdboom deleted the mdboom:fix-stretch-invalid branch Aug 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment