Skip to content

Commit

Permalink
fix matplotlib 1.5 in m21_2 also
Browse files Browse the repository at this point in the history
  • Loading branch information
mscuthbert committed Nov 27, 2015
1 parent b8c6e6a commit 4801533
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions music21/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1030,13 +1030,14 @@ def process(self):
# then start y position, bar height
faceColor = getColor(self.colors[i % len(self.colors)])

yrange = (yPos + self._margin, self._barHeight)
ax.broken_barh(points, yrange, facecolors=faceColor, alpha=self.alpha)
for xStart, xLen in points:
xEnd = xStart + xLen
for x in [xStart, xEnd]:
if x not in xPoints:
xPoints.append(x)
if len(points) > 0:
yrange = (yPos + self._margin, self._barHeight)
ax.broken_barh(points, yrange, facecolors=faceColor, alpha=self.alpha)
for xStart, xLen in points:
xEnd = xStart + xLen
for x in [xStart, xEnd]:
if x not in xPoints:
xPoints.append(x)
# ticks are value, label
yTicks.append([yPos + self._barSpace * .5, key])
#yTicks.append([key, yPos + self._barSpace * .5])
Expand Down

0 comments on commit 4801533

Please sign in to comment.