Skip to content

Minor fix label outline #231

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

Merged
merged 7 commits into from
Mar 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/spatialdata_plot/pl/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,9 @@ def _render_labels(
elements = render_params.elements
element_table_mapping = cast(dict[str, str], render_params.element_table_mapping)

if render_params.outline is False:
render_params.outline_alpha = 0

sdata_filt = sdata.filter_by_coordinate_system(
coordinate_system=coordinate_system,
filter_tables=any(value is not None for value in element_table_mapping.values()),
Expand Down Expand Up @@ -642,7 +645,6 @@ def _render_labels(
trans = mtransforms.Affine2D(matrix=affine_trans)
trans_data = trans + ax.transData

# get color vector (categorical or continuous)
color_source_vector, color_vector, categorical = _set_color_source_vec(
sdata=sdata_filt,
element=label,
Expand Down