-
Notifications
You must be signed in to change notification settings - Fork 14
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 transformed labels with outline #275
base: main
Are you sure you want to change the base?
Fix transformed labels with outline #275
Conversation
6fb8c55
to
b63030d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #275 +/- ##
=======================================
Coverage 84.27% 84.27%
=======================================
Files 8 8
Lines 1558 1558
=======================================
Hits 1313 1313
Misses 245 245 |
I looked into the 2 lines of missing coverage. These are the two lines that seemed to be wrongly indented. By indenting them, I moved them into an untested code block, so that they are not covered anymore. The else-branch is commented as "Default: no alpha, contour = infill" and not covered by tests. I tried adding a test to improve coverage, but am not convinced that this is the correct result. I think the code is wrong, the labels should be filled and my test (below) should fail. That means before adding the test we need a plot file of the correct, expected result. Or the else-branch should be removed. Test case for infill def test_plot_can_render_contour_with_infill(self, sdata_blobs):
# Rendering with fill_alpha == outline_alpha takes a special code path
sdata_blobs.pl.render_labels(
"blobs_labels",
color="channel_0_sum",
fill_alpha=1.0,
outline=True,
outline_alpha=1.0,
).pl.show() |
Hi @aeisenbarth, thanks for the PR. I will merge a couple of PRs first and then adjust this one if required. |
2dd8444
to
61ff47c
Compare
@aeisenbarth can you rename that one function? |
Outlines are rendered on an axis separate from the filled labels. The transformation was only applied to the filled labels, so that the outlines had an identity transform. This was not observable when outlines were off or the transform was an identity (as in the blobs data).
Closes #273
For comparison with the example in the linked issue: