Skip to content

A couple of fixes to render_labels - #253

Closed
clwgg wants to merge 2 commits into
scverse:mainfrom
clwgg:fix_render_labels
Closed

clwgg wants to merge 2 commits into
scverse:mainfrom
clwgg:fix_render_labels

Conversation

@clwgg

@clwgg clwgg commented Apr 24, 2024

Copy link
Copy Markdown

Fixes #252, #240

This PR includes fixes to two semi-related issues:

While digging around for a fix to #252, I also did some additional testing which led to:

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)
main-2
(notice the lack of fill even though alpha=1.0, as reported in #240)
main-4

With the fixes included here, the outputs are:
dev-2
dev-4

@timtreis timtreis self-assigned this May 16, 2024
@timtreis timtreis closed this Aug 28, 2024
@clwgg
clwgg deleted the fix_render_labels branch August 29, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Artifact" when plotting labels with outline=True

2 participants