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
Fix broken link to proxy artists documentation #9343
Conversation
http://matplotlib.org/users/legend_guide.html#using-proxy-artist refers to a named anchor that is unavailable.
Thanks for opening a PR! We require any new code to require to the PEP8 guidelines - it looks like one of your added lines is too long (see here for the error https://travis-ci.org/matplotlib/matplotlib/jobs/286021773#L2930) - could you make it less than 80 characters long? |
@dstansby Thank you for your review. I was aware that it violates the 80-character rule of PEP8, but my understanding was that long URLs are an exception (for copying, readability, etc.). See https://google.github.io/styleguide/pyguide.html#Line_length, https://stackoverflow.com/questions/10739843/how-should-i-format-a-long-url-in-a-python-comment-and-still-be-pep8-compliant, or even from the
That being said, if I should still make it less than 80 characters long, I can change it to the following:
|
Does |
You can add entries in pytest.ini, but here I'd just split the string tbh (ignore entries in pytest.ini is a bit of a giant hammer). |
lib/matplotlib/legend.py
Outdated
@@ -616,11 +616,12 @@ def _init_legend_box(self, handles, labels, markerfirst=True): | |||
for orig_handle, lab in zip(handles, labels): | |||
handler = self.get_legend_handler(legend_handler_map, orig_handle) | |||
if handler is None: | |||
fragment = "#creating-artists-specifically-for-adding-to-the-legend-aka-proxy-artists" |
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.
you can also use \
to split a line
That is a bit of an absurd ref target...
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.
This looks good to me. Link works...
Thanks @deepyaman ! |
Backport PR #9343 on branch v2.1.x
http://matplotlib.org/users/legend_guide.html#using-proxy-artist refers
to a named anchor that is unavailable. Use
http://matplotlib.org/users/legend_guide.html#creating-artists-specifically-for-adding-to-the-legend-aka-proxy-artists
instead.