Conversation
lib/matplotlib/legend_handler.py
Outdated
There was a problem hiding this comment.
Needs a docstring to describe these new arguments.
18d5388 to
2e31317
Compare
|
@WeatherGod Updated |
There was a problem hiding this comment.
dictionary comprehensions weren't added until py2.7
There was a problem hiding this comment.
Hmm, why didn't Travis pick that up? I thought it went through all examples...
There was a problem hiding this comment.
It goes through the examples as part of the doc build, which is probably
not py2.6.
On Mon, Apr 20, 2015 at 11:34 AM, OceanWolf notifications@github.com
wrote:
In examples/pylab_examples/legend_demo5.py
#2904 (comment):+p1 = ax1.scatter([1], [5], c='r', marker='s', s=100)
+p2 = ax1.scatter([3], [2], c='b', marker='o', s=100)
+
+l = ax1.legend([(p1, p2)], ['points'], scatterpoints=1,
handler_map={tuple: HandlerTuple(ndivide=0)})+ind = [1, 2, 3]
+pos1 = [1, 3, 2]
+neg1 = [2, 1, 4]
+width = [0.5, 0.5, 0.5]
+
+rpos1 = ax2.bar(ind, pos1, width=0.5, color='k', label='+1')
+rneg1 = ax2.bar(ind, neg1, width=0.5, color='w', hatch='///', label='-1')
+
+l = ax2.legend([(rpos1, rneg1)], ['Test'],handler_map={(rpos1, rneg1): HandlerTuple(ndivide=0, pad=0.)})Hmm, why didn't Travis pick that up? I thought it went through all
examples...—
Reply to this email directly or view it on GitHub
https://github.com/matplotlib/matplotlib/pull/2904/files#r28699293.
|
flash from the past! Need at least one unit test and a what's new entry. I also don't think the example is all that clear. It could benefit greatly from some comments and/or a top-level docstring. |
|
This is not at the top of my to-do queue, if anyone wants to take over this PR, please do! |
|
This PR can be closed (see #5617). |

This needs a bit more attention, but useful PR (I came up with a much-less clean way of doing the same thing)
replaces and closes #2034