We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 549a6eb commit 48227caCopy full SHA for 48227ca
src/spatialdata_plot/pl/render.py
@@ -59,9 +59,13 @@ def _render_shapes(
59
if sdata.table is not None and isinstance(params["instance_key"], str) and isinstance(params["color_key"], str):
60
colors = [to_rgb(c) for c in sdata.table.uns[f"{params['color_key']}_colors"]]
61
62
- else:
63
- assert isinstance(params["palette"], Iterable)
+ elif isinstance(params["palette"], str):
+ colors = [params["palette"]]
64
+ elif isinstance(params["palette"], Iterable):
65
colors = [to_rgb(c) for c in list(params["palette"])]
66
+ else:
67
+ # assert isinstance(params["palette"], Iterable)
68
69
70
ax.set_xlim(extent["x"][0], extent["x"][1])
71
ax.set_ylim(extent["y"][0], extent["y"][1])
0 commit comments