DOC: refactor axes with lists#2129
Conversation
| ax[3].imshow(labels, cmap=plt.cm.spectral, interpolation='nearest', alpha=.7) | ||
| ax[3].set_title("Segmented") | ||
|
|
||
| for a in axes: |
|
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.
We should refactor this in further PRs.
There was a problem hiding this comment.
I don't understand your comment?
There was a problem hiding this comment.
Ah, I see, this is a leftover comment. Ignore.
There was a problem hiding this comment.
@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) |
|
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.