Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix #5572: Allow passing empty range to broken_barh #5600
Conversation
mdboom
added this to the
Critical bugfix release (1.5.1)
milestone
Dec 1, 2015
mdboom
added the
needs_review
label
Dec 1, 2015
tacaswell
commented on an outdated diff
Dec 1, 2015
| @@ -2333,8 +2333,16 @@ def broken_barh(self, xranges, yrange, **kwargs): | ||
| .. plot:: mpl_examples/pylab_examples/broken_barh.py | ||
| """ | ||
| # process the unit information | ||
| - self._process_unit_info(xdata=xranges[0], | ||
| - ydata=yrange[0], | ||
| + if len(xranges): | ||
| + xdata = xranges[0] |
tacaswell
Owner
|
tacaswell
commented on an outdated diff
Dec 3, 2015
| @@ -2333,8 +2333,16 @@ def broken_barh(self, xranges, yrange, **kwargs): | ||
| .. plot:: mpl_examples/pylab_examples/broken_barh.py | ||
| """ | ||
| # process the unit information | ||
| - self._process_unit_info(xdata=xranges[0], | ||
| - ydata=yrange[0], | ||
| + if len(xranges): | ||
| + xdata = six.next(iter(xranges)) | ||
| + else: | ||
| + xdata = None | ||
| + if len(yrange): | ||
| + ydata = six.next(iter(yranges)) |
|
|
|
I dimly recall seeing this sort of pre-processing prior to _process_unit_info elsewhere; does it need to be factored out? E.g., could it be added to _process_unit_info itself, perhaps activated with a kwarg? Is there also a Pandas conversion stage that we are stuck having to use now, so that we don't end up sprinkling things like six.next(iter(xxx)) all over the place? |
|
This is now ready to merge. |
tacaswell
commented on the diff
Dec 22, 2015
| @@ -2339,8 +2339,16 @@ def broken_barh(self, xranges, yrange, **kwargs): | ||
| .. plot:: mpl_examples/pylab_examples/broken_barh.py | ||
| """ | ||
| # process the unit information | ||
| - self._process_unit_info(xdata=xranges[0], | ||
| - ydata=yrange[0], | ||
| + if len(xranges): | ||
| + xdata = six.next(iter(xranges)) |
tacaswell
Owner
|
efiring
added a commit
that referenced
this pull request
Dec 28, 2015
|
|
efiring |
e7c51dc
|
efiring
merged commit e7c51dc
into matplotlib:master
Dec 28, 2015
efiring
removed the
needs_review
label
Dec 28, 2015
efiring
added a commit
that referenced
this pull request
Dec 28, 2015
|
|
efiring + tacaswell |
8228dbd
|
|
backported as 8228dbd |
mdboom commentedDec 1, 2015
No description provided.