You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to plot some clusters with "group=", some of them are indeed plotted and others, without any apparent reason, yield this error:
clusters_list = sdata['square_008um'].obs['clusters'].unique()
for cluster in clusters_list:
try:
sdata.pl.render_images('wt1_hires_image').pl.render_shapes(
'wt1_square_008um',
color="clusters", # Color by the 'clusters' column
groups=[cluster],
size=0.3,
).pl.show(
coordinate_systems="downscaled_hires",
figsize=(10, 10)
)
except Exception as e:
print(f"Error while plotting cluster {cluster}: {e}")
INFO Rasterizing image for faster rendering.
[/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py:105](https://192.33.153.24/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py#line=104): UserWarning: Key wt1_square_008um already exists. Overwriting it in-memory.
self._check_key(key, self.keys(), self._shared_keys)
[/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py:125](https://192.33.153.24/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py#line=124): UserWarning: Key square_008um already exists. Overwriting it in-memory.
self._check_key(key, self.keys(), self._shared_keys)
INFO Using 'datashader' backend with 'None' as reduction method to speed up plotting. Depending on the
reduction method, the value range of the plot might change. Set method to 'matplotlib' do disable this
behaviour.
[/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata_plot/pl/utils.py:771](https://192.33.153.24/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata_plot/pl/utils.py#line=770): FutureWarning: The default value of 'ignore' for the na_action parameter in [pandas.Categorical.map](http://pandas.categorical.map/) is deprecated and will be changed to 'None' in a future version. Please set na_action to the desired value to avoid seeing this warning
color_vector = color_source_vector.map(color_mapping)
Error while plotting cluster 0: The element does not contain any coordinate system named 'downscaled_hires', please pass a different coordinate system with the argument 'coordinate_system'.
INFO Rasterizing image for faster rendering.
[/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py:105](https://192.33.153.24/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py#line=104): UserWarning: Key wt1_square_008um already exists. Overwriting it in-memory.
self._check_key(key, self.keys(), self._shared_keys)
[/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py:125](https://192.33.153.24/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py#line=124): UserWarning: Key square_008um already exists. Overwriting it in-memory.
self._check_key(key, self.keys(), self._shared_keys)
[/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata_plot/pl/utils.py:771](https://192.33.153.24/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata_plot/pl/utils.py#line=770): FutureWarning: The default value of 'ignore' for the na_action parameter in [pandas.Categorical.map](http://pandas.categorical.map/) is deprecated and will be changed to 'None' in a future version. Please set na_action to the desired value to avoid seeing this warning
color_vector = color_source_vector.map(color_mapping)
INFO Rasterizing image for faster rendering.
[/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py:105](https://192.33.153.24/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py#line=104): UserWarning: Key wt1_square_008um already exists. Overwriting it in-memory.
self._check_key(key, self.keys(), self._shared_keys)
[/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py:125](https://192.33.153.24/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata/_core/_elements.py#line=124): UserWarning: Key square_008um already exists. Overwriting it in-memory.
self._check_key(key, self.keys(), self._shared_keys)
INFO Using 'datashader' backend with 'None' as reduction method to speed up plotting. Depending on the
reduction method, the value range of the plot might change. Set method to 'matplotlib' do disable this
behaviour.
[/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata_plot/pl/utils.py:771](https://192.33.153.24/opt/conda/envs/spatialdatahd/lib/python3.10/site-packages/spatialdata_plot/pl/utils.py#line=770): FutureWarning: The default value of 'ignore' for the na_action parameter in [pandas.Categorical.map](http://pandas.categorical.map/) is deprecated and will be changed to 'None' in a future version. Please set na_action to the desired value to avoid seeing this warning
color_vector = color_source_vector.map(color_mapping)
Error while plotting cluster 15: The element does not contain any coordinate system named 'downscaled_hires', please pass a different coordinate system with the argument 'coordinate_system'.
Though it seems that coordinate systems are set, as shown above.
Any ideas why?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
reporting an issue with plotting.
and
When I try to plot some clusters with "group=", some of them are indeed plotted and others, without any apparent reason, yield this error:
Though it seems that coordinate systems are set, as shown above.
Any ideas why?
Thanks!
The text was updated successfully, but these errors were encountered: