-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
re-ordered the list of artists returned by legend_handler.HandlerErrorbar
#2532
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
re-ordered the list of artists returned by legend_handler.HandlerErrorbar
#2532
Conversation
Is there a way to write an easy test for this? |
It would be easy to test if the returned artist is a I suspect that this band-aid which hides an underlying picking issue when dealing with over-lapping artists (which may be un-fixable). I also suspect that is a down-payment on a more substantial re-work of |
artists.extend(handle_barlinecols) | ||
artists.extend(handle_caplines) | ||
artists.append(legline) | ||
artists.append(legline_marker) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this result in 2 newlines? (its hard to tell with github). If so, would you mind removing one of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, I also pep8'd the entire file while I was at it.
rebased onto current master. |
re-based again, my local master wasn't really pointing at upstream master, sorry about that. |
6caa4ac
to
a256a2c
Compare
a256a2c
to
6882780
Compare
I am going to abandon this PR. |
This is to address an issue raised on SO http://stackoverflow.com/questions/19470104/python-matplotlib-errobar-legend-picking.
As near as I can tell,
create_artists
is only ever called byHandlerBase.__call__()
which then drops all but the first artist, which is returned by__call__
and added tolegend.ledgendHandles
.Re-ordering the artist makes picking on them behave better (see the SO question at the top).
This technically breaks the API, but I would be surprised if anyone is actually using this (yes, http://xkcd.com/1172/).