A couple of fixes to `render_labels`
Fixes #252, #240
This PR includes fixes to two semi-related issues:
- #252 is addressed in commit d73ccd3
While digging around for a fix to #252, I also did some additional testing which led to:
- #240 being addressed in commit 377e121
NOTE: I'm not totally sure about the validity of the changes in 377e121, since I can't quite tell which case the else code path is supposed to cover. From my experiments, it seemed like the code path of blending labels_infill and labels_contour could cover all combinations of outline and alpha I tried, but it's absolutely possible I missed something here.
As a comparison, I ran the following commands with and without these commits:
sdata.pl.render_labels(outline=True).pl.show()
sdata.pl.render_labels(outline=True, fill_alpha=1.0).pl.show()
(the corresponding outline=False plots look fine both with and without these changes)
Without these commits, the outputs are:
(notice the artifact in the top-left, as reported in #252)
(notice the lack of fill even though
alpha=1.0, as reported in #240)
With the fixes included here, the outputs are: