-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
DOC: refactor axes with lists #2129
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
Conversation
| ax[3].imshow(labels, cmap=plt.cm.spectral, interpolation='nearest', alpha=.7) | ||
| ax[3].set_title("Segmented") | ||
|
|
||
| for a in axes: |
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.
*axes -> ax
|
Fixed and I corrected few other places. |
|
and fixed again. |
|
Here come the conflicts 😈. |
|
@soupault rebased 🎱 |
| ax.imshow(zdh) | ||
| ax.set_title("Stain separated image (rescaled)") | ||
| ax.axis('off') | ||
| axis = plt.subplot(1, 1, 1, sharex=ax[0], sharey=ax[0], adjustable='box-forced') |
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.
We should refactor this in further PRs.
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.
I don't understand your comment?
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.
Ah, I see, this is a leftover comment. Ignore.
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.
@ahojnnes I meant that 1, 1, 1, sharex=ax[0], sharey=ax[0] is redundant here. fig, axes might be initialized in a single line (same as in other examples).
|
👍 |
|
@sciunto Travis fails. |
|
@ahojnnes ? Travis is green for me. |
|
Interestingly it does for me now as wel. In it goes. Thanks. |
Current coverage is 90.50%@@ master #2129 diff @@
==========================================
Files 297 297
Lines 21230 21230
Methods 0 0
Messages 0 0
Branches 1949 1949
==========================================
Hits 19215 19215
+ Misses 1665 1661 -4
- Partials 350 354 +4
|
|
Just to clarify, there was no magic - I restarted the build for OS X (the one which was failing). |
| ax0.imshow(l_resized, extent=(0, 128, 128, 0), interpolation='nearest', | ||
| ax[0].set_title("Original rescaled with\n spline interpolation (order=3)") | ||
| ax[0].imshow(l_resized, extent=(0, 128, 128, 0), interpolation='nearest', | ||
| cmap=cm.Greys_r) |
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 broke PEP8
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.
I'll quickly fix it.
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.
See #2136
|
Can someone explain to me how this reduces boilerplate? The bulk of this PR is every |
|
Nope, but I don't care either way and thought this convention was agreed upon. I would argue that the majority of our examples use the |
|
@ahojnnes if that's the case I'm ok. I assumed that this PR changed all examples from one convention to the other. Consistency is good! =) |
|
@jni It's only 8 changed files and I hope we have more examples ;-) |
To avoid boilerplate code and to make things easier to modify.