10000 colorbar: correct error introduced in commit 089024; closes #1102 by efiring · Pull Request #1103 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

colorbar: correct error introduced in commit 089024; closes #1102 #1103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 17, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
colorbar: correct error introduced in commit 089024; closes #1102
  • Loading branch information
efiring committed Aug 17, 2012
commit 315573fc9f2d26d2019bc146dbd577e43e6bf44e
6 changes: 4 additions & 2 deletions lib/matplotlib/colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ class ColorbarBase(cm.ScalarMappable):
the Axes instance in which the colorbar is drawn

:attr:`lines`
a LineCollection if lines were drawn, otherwise None
a list of LineCollection if lines were drawn, otherwise
an empty list

:attr:`dividers`
a LineCollection if *drawedges* is True, otherwise None
Expand Down Expand Up @@ -495,8 +496,9 @@ def add_lines(self, levels, colors, linewidths, erase=True):
col = collections.LineCollection(xy, linewidths=linewidths)

if erase and self.lines:
for lc in self.lines.pop():
for lc in self.lines:
lc.remove()
self.lines = []
self.lines.append(col)
col.set_color(colors)
self.ax.add_collection(col)
Expand Down
0