Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions src/spatialdata_plot/pl/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def render_shapes(
self,
element: str | None = None,
color: ColorLike | None = None,
*,
fill_alpha: float | int | None = None,
groups: list[str] | str | None = None,
palette: list[str] | str | None = None,
Expand Down Expand Up @@ -339,6 +340,7 @@ def render_points(
self,
element: str | None = None,
color: ColorLike | None = None,
*,
alpha: float | int | None = None,
groups: list[str] | str | None = None,
palette: list[str] | str | None = None,
Expand Down Expand Up @@ -482,6 +484,7 @@ def render_points(
def render_images(
self,
element: str | None = None,
*,
channel: list[str] | list[int] | str | int | None = None,
cmap: list[Colormap | str] | Colormap | str | None = None,
norm: Normalize | None = None,
Expand Down Expand Up @@ -599,6 +602,7 @@ def render_labels(
self,
element: str | None = None,
color: str | None = None,
*,
groups: list[str] | str | None = None,
contour_px: int | None = 3,
palette: list[str] | str | None = None,
Expand Down Expand Up @@ -728,6 +732,7 @@ def render_labels(
def show(
self,
coordinate_systems: list[str] | str | None = None,
*,
legend_fontsize: int | float | _FontSize | None = None,
legend_fontweight: int | _FontWeight = "bold",
legend_loc: str | None = "right margin",
Expand Down
2 changes: 1 addition & 1 deletion tests/pl/test_render_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def test_warns_when_table_does_not_annotate_element(sdata_blobs: SpatialData):

# Create a table that annotates a DIFFERENT element than the one we will render
other_table = sdata_blobs_local["table"].copy()
other_table.obs["region"] = "blobs_multiscale_labels"
other_table.obs["region"] = pd.Categorical(["blobs_multiscale_labels"] * other_table.n_obs)
other_table.uns["spatialdata_attrs"]["region"] = "blobs_multiscale_labels"
sdata_blobs_local["other_table"] = other_table

Expand Down
2 changes: 1 addition & 1 deletion tests/pl/test_render_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def test_warns_when_table_does_not_annotate_element(sdata_blobs: SpatialData):

# Create a table that annotates a DIFFERENT element than the one we will render
other_table = sdata_blobs_local["table"].copy()
other_table.obs["region"] = "blobs_labels" # Different from blobs_points
other_table.obs["region"] = pd.Categorical(["blobs_labels"] * other_table.n_obs) # Different from blobs_points
other_table.uns["spatialdata_attrs"]["region"] = "blobs_labels"
sdata_blobs_local["other_table"] = other_table

Expand Down
2 changes: 1 addition & 1 deletion tests/pl/test_render_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def test_warns_when_table_does_not_annotate_element(sdata_blobs: SpatialData):

# Create a table that annotates a DIFFERENT element than the one we will render
other_table = sdata_blobs_local["table"].copy()
other_table.obs["region"] = "blobs_points" # Different from blobs_circles
other_table.obs["region"] = pd.Categorical(["blobs_points"] * other_table.n_obs) # Different region
other_table.uns["spatialdata_attrs"]["region"] = "blobs_points"
sdata_blobs_local["other_table"] = other_table

Expand Down