Legend tuple handler improve #5617

Merged
merged 9 commits into from Mar 19, 2016

Conversation

Projects
None yet
6 participants
Contributor

three-comrades commented Dec 4, 2015

Continuation of #2904 and #2034.

Rebased, added some more documentation and adapted the example a bit.

I'm not sure how to ceate the test image. I created it on Ubuntu 14.04. which uses version 2.5.2 of the Freetype library - do I need to compile+install 2.5.3, or even the exact, possibly patched Fedora version that was used to create the rest of the images?

Contributor

three-comrades commented Dec 4, 2015

Eh, sry, I screwed up with the initial push. Hopefully it's okay now.

Owner

tacaswell commented Dec 4, 2015

👍 awesome

attn @mdboom re question about freetype.

Member

QuLogic commented Dec 4, 2015

To create consistent text output, you need to set local_freetype = True in setup.cfg before building to use a specific version of FreeType instead of the system one.

Owner

mdboom commented Dec 5, 2015

@QuLogic is exactly right about freetype here. This is new since 1.5.x, so is documented in the "devdocs", not the default doc version, here:

http://matplotlib.org/devdocs/devel/testing.html#building-matplotlib-for-image-comparison-tests

Contributor

three-comrades commented Dec 5, 2015

Okay, I've recreated the test with the built-in FreeType version.

Owner

tacaswell commented Feb 15, 2016

'power cycling' this PR to make it rebuild against current master.

tacaswell closed this Feb 15, 2016

tacaswell reopened this Feb 15, 2016

@tacaswell tacaswell added needs_review and removed needs_review labels Feb 15, 2016

leejjoon and others added some commits May 18, 2013

Contributor

three-comrades commented Mar 19, 2016

Rebased. Last time a Python 2.7 test failed that seemed unrelated to me (matplotlib.tests.test_mathtext.test_mathfont_stix_07.test). Let's see if that is still the case.

@tacaswell tacaswell and 1 other commented on an outdated diff Mar 19, 2016

lib/matplotlib/legend_handler.py
@@ -565,9 +568,29 @@ def create_artists(self, legend, orig_handle,
class HandlerTuple(HandlerBase):
"""
- Handler for Tuple
+ Handler for Tuple.
+
+ Additional kwargs are passed through to `HandlerBase`.
+
+ Parameters
+ ----------
+
+ ndivide : int, optional
+ The number of sections to divide the legend area into. If 0,
@tacaswell

tacaswell Mar 19, 2016

Owner

Can we use None as the sentinel value?

@three-comrades three-comrades Use None as sentinel value for ndivide.
9f10618
Member

WeatherGod commented Mar 19, 2016

I think this needs a whats_new entry?

Contributor

three-comrades commented Mar 19, 2016

I put a description in doc/users/whats_new/multiple_legend_keys.rst. Is that enough?

Edit: sry, I was in a hurry. What I meant to say: @WeatherGod did you notice the description in doc/users/whats_new/multiple_legend_keys.rst?

If not, is that what you had in mind?
If so, what exactly are you missing compared to that description? :)

Owner

tacaswell commented Mar 19, 2016

@three-comrades Yes, that looks sufficient to me.

Owner

tacaswell commented Mar 19, 2016

👍 from me, but I will refrain from pushing the green button because I have commits in this PR.

@WeatherGod WeatherGod added a commit that referenced this pull request Mar 19, 2016

@WeatherGod WeatherGod Merge pull request #5617 from three-comrades/legend-tuple-handler-imp…
…rove

Legend tuple handler improve
4230879

@WeatherGod WeatherGod merged commit 4230879 into matplotlib:master Mar 19, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

mdboom removed the needs_review label Mar 19, 2016

three-comrades deleted the three-comrades:legend-tuple-handler-improve branch Mar 19, 2016

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