Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Clarify Axes.hexbin *extent* docstring #6842
Conversation
mdboom
added the
needs_review
label
Jul 26, 2016
Kojoley
commented on an outdated diff
Jul 26, 2016
Kojoley
commented on an outdated diff
Jul 26, 2016
Kojoley
commented on an outdated diff
Jul 26, 2016
| @@ -530,9 +530,9 @@ def legend(self, *args, **kwargs): | ||
| labels = [handle.get_label() for handle in handles] | ||
| for label, handle in zip(labels[:], handles[:]): | ||
| if label.startswith('_'): | ||
| - warnings.warn('The handle {!r} has a label of {!r} which ' | ||
| - 'cannot be automatically added to the ' | ||
| - 'legend.'.format(handle, label)) | ||
| + warnings.warn("The handle {!r} has a label of {!r} which " | ||
| + "cannot be automatically added to the " | ||
| + "legend.'.format(handle, label)) |
Kojoley
Member
|
LindyBalboa
commented
Jul 26, 2016
|
I noticed the None/none variance in several places, but didn't think I touched any of them. And you are right, somehow I missed that last one. I will look into the None/none issue and fix that quote tomorrow. I knew my first PR was going to have some silly mistakes! |
|
Looks like there are a bunch of pep8 whitespace related issues.
the enforcement of pep8/pycodestyle is annoying, but long term it is very helpful in a codebase with many people touching the code. |
tacaswell
commented on an outdated diff
Jul 28, 2016
tacaswell
commented on an outdated diff
Jul 28, 2016
| @@ -530,9 +530,9 @@ def legend(self, *args, **kwargs): | ||
| labels = [handle.get_label() for handle in handles] | ||
| for label, handle in zip(labels[:], handles[:]): | ||
| if label.startswith('_'): | ||
| - warnings.warn('The handle {!r} has a label of {!r} which ' | ||
| - 'cannot be automatically added to the ' | ||
| - 'legend.'.format(handle, label)) | ||
| + warnings.warn("The handle {!r} has a label of {!r} which " |
|
|
tacaswell
and 1 other
commented on an outdated diff
Jul 28, 2016
| @@ -2394,7 +2394,8 @@ def stem(self, *args, **kwargs): | ||
| linestyle, linemarker, linecolor = \ | ||
| _process_plot_format(linefmt) | ||
| else: | ||
| - linestyle, linemarker, linecolor = _process_plot_format(linefmt) |
LindyBalboa
|
tacaswell
commented on an outdated diff
Jul 28, 2016
| *extent*: [ *None* | scalars (left, right, bottom, top) ] | ||
| The limits of the bins. The default assigns the limits | ||
| - based on gridsize, x, y, xscale and yscale. | ||
| + based on *gridsize*, *x*, *y*, *xscale* and *yscale*. | ||
| + | ||
| + If *xscale* or *yscale* is set to 'log', the limit is |
tacaswell
Owner
|
tacaswell
modified the milestone: 2.1 (next point release), 2.0.1 (next bug fix release)
Jul 28, 2016
tacaswell
commented on an outdated diff
Jul 28, 2016
| *extent*: [ *None* | scalars (left, right, bottom, top) ] | ||
| The limits of the bins. The default assigns the limits | ||
| - based on gridsize, x, y, xscale and yscale. | ||
| + based on *gridsize*, *x*, *y*, *xscale* and *yscale*. | ||
| + | ||
| + If *xscale* or *yscale* is set to 'log', the limit is | ||
| + expected as a power of 10. E.g. for x-limits of 1 and |
tacaswell
Owner
|
|
The documentation changes seem very good, however it is greatly obscured by the changes to the quotes. Would it be possible to separate those two sets of changes? |
LindyBalboa
commented
Jul 28, 2016
|
This was definitely a learning experience. I had to learn a lot about git, virtual environments, building/installing, testing. Yowza. And I definitely learned the importance of splitting up PRs. Thanks for the patience guys. |
|
@LindyBalboa Everyone starts someplace! Sorry the learning curve was steep. |
tacaswell
merged commit af87fb4
into matplotlib:master
Aug 2, 2016
tacaswell
removed the
needs_review
label
Aug 2, 2016
tacaswell
added a commit
that referenced
this pull request
Aug 2, 2016
|
|
tacaswell |
2811640
|
|
backported to v2.x as 2811640 |
|
@LindyBalboa Thank you (and thank you for going through the learning curve!) Documentation is drastically undervalued and we very much appreciate your work on this. I think this is your first contribution to mpl. Congratulation |
LindyBalboa commentedJul 26, 2016
Without looking at the source, it was unclear that extent expects the
limits to be given as powers of ten if the axis scale is set to 'log'.
E.g., using 3 to represent 1000.
Also went through the file and standardized quote usage.
Resolves: #6479