From 6fe5ecc313e6de9b09db796c459b4df103ddcebd Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Wed, 18 Dec 2024 17:08:32 +0100 Subject: [PATCH 1/5] added tests for plotting columns from points --- tests/pl/test_render_points.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/pl/test_render_points.py b/tests/pl/test_render_points.py index e3e99099..302eaea5 100644 --- a/tests/pl/test_render_points.py +++ b/tests/pl/test_render_points.py @@ -5,6 +5,7 @@ import matplotlib.pyplot as plt import numpy as np import pandas as pd +import pytest import scanpy as sc from anndata import AnnData from spatialdata import SpatialData, deepcopy @@ -111,6 +112,14 @@ def test_plot_datashader_continuous_color(self, sdata_blobs: SpatialData): element="blobs_points", size=40, color="instance_id", alpha=0.6, method="datashader" ).pl.show() + @pytest.mark.parametrize("method", ["matplotlib", "datashader"]) + def test_plot_points_categorical_color_column(self, sdata_blobs: SpatialData, method: str): + sdata_blobs.pl.render_points("blobs_points", color="genes", method=method).pl.show() + + @pytest.mark.parametrize("method", ["matplotlib", "datashader"]) + def test_plot_points_continuous_color_column(self, sdata_blobs: SpatialData, method: str): + sdata_blobs.pl.render_points("blobs_points", color="instance_id", method=method).pl.show() + def test_plot_datashader_matplotlib_stack(self, sdata_blobs: SpatialData): sdata_blobs.pl.render_points( element="blobs_points", size=40, color="red", method="datashader" From db06a99223e442dd058492e8f1d122ca39d9626f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:09:59 +0000 Subject: [PATCH 2/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CHANGELOG.md | 122 +++++++++++++++++++++---------------------- README.md | 4 +- docs/contributing.md | 18 +++---- 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6973baa3..2cbc0c88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,166 +12,166 @@ and this project adheres to [Semantic Versioning][]. ### Fixed -- Transformations of Points and Shapes are now applied before rendering with datashader (#378) +- Transformations of Points and Shapes are now applied before rendering with datashader (#378) ## [0.2.8] - 2024-11-26 ### Changed -- Support for `xarray.DataTree` (which moved from `datatree.DataTree`) (#380) +- Support for `xarray.DataTree` (which moved from `datatree.DataTree`) (#380) ## [0.2.7] - 2024-10-24 ### Added -- The user can now specify `datashader_reduction` to control the rendering behaviour (#309) -- Rendering outlines of shapes with datashader works now (#309) +- The user can now specify `datashader_reduction` to control the rendering behaviour (#309) +- Rendering outlines of shapes with datashader works now (#309) ### Fixed -- datashader now uses canvas size = image size which speeds up the rendering (#309) -- datashader now uses the `linear` as interpolation method for colormaps instead of the default `eq_hist` to make it equivalent to matplotlib (#309) -- point sizes of datashader now agree with matplotlib also when dpi != 100 (#309) -- Giving a custom colormap when rendering a multiscale image now works (#586) +- datashader now uses canvas size = image size which speeds up the rendering (#309) +- datashader now uses the `linear` as interpolation method for colormaps instead of the default `eq_hist` to make it equivalent to matplotlib (#309) +- point sizes of datashader now agree with matplotlib also when dpi != 100 (#309) +- Giving a custom colormap when rendering a multiscale image now works (#586) ## [0.2.6] - 2024-09-04 ### Changed -- Lowered RMSE-threshold for plot-based tests from 45 to 15 (#344) -- When subsetting to `groups`, `NA` isn't automatically added to legend (#344) -- When rendering a single image channel, a colorbar is now shown (#346) -- Removed `percentiles_for_norm` parameter (#346) -- Changed `norm` to no longer accept bools, only `mpl.colors.Normalise` or `None` (#346) +- Lowered RMSE-threshold for plot-based tests from 45 to 15 (#344) +- When subsetting to `groups`, `NA` isn't automatically added to legend (#344) +- When rendering a single image channel, a colorbar is now shown (#346) +- Removed `percentiles_for_norm` parameter (#346) +- Changed `norm` to no longer accept bools, only `mpl.colors.Normalise` or `None` (#346) ### Fixed -- Filtering with `groups` now preserves original cmap (#344) -- Non-selected `groups` are now not shown in `na_color` (#344) -- Several issues associated with `norm` and `colorbar` (#346) +- Filtering with `groups` now preserves original cmap (#344) +- Non-selected `groups` are now not shown in `na_color` (#344) +- Several issues associated with `norm` and `colorbar` (#346) ## [0.2.5] - 2024-08-23 ### Changed -- Replaced `outline` parameter in `render_labels` with alpha-based logic (#323) -- Lowered RMSE-threshold for plot-based tests from 60 to 45 (#323) -- Removed `preprocessing` (.pp) accessor (#329) +- Replaced `outline` parameter in `render_labels` with alpha-based logic (#323) +- Lowered RMSE-threshold for plot-based tests from 60 to 45 (#323) +- Removed `preprocessing` (.pp) accessor (#329) ### Fixed -- Minor fixes for several tests as a result of the threshold change (#323) +- Minor fixes for several tests as a result of the threshold change (#323) ## [0.2.4] - 2024-08-07 ### Added -- Added utils function for 0-transparent cmaps (#302) +- Added utils function for 0-transparent cmaps (#302) ### Fixed -- Took RNG out of categorical label test (#306) -- Performance bug when plotting shapes (#298) -- scale parameter was ignored for single-scale images (#301) -- Changes to support for dask-expr (#283) -- Added error handling for non-existent elements (#305) -- Specifying vmin and vmax properly clips image data (#307) -- import bug `get_cmap()` (8fd969c) +- Took RNG out of categorical label test (#306) +- Performance bug when plotting shapes (#298) +- scale parameter was ignored for single-scale images (#301) +- Changes to support for dask-expr (#283) +- Added error handling for non-existent elements (#305) +- Specifying vmin and vmax properly clips image data (#307) +- import bug `get_cmap()` (8fd969c) ## [0.2.3] - 2024-07-03 ### Added -- Datashader support for points and shapes (#244) +- Datashader support for points and shapes (#244) ### Changed -- All parameters are now provided for a single element (#272) +- All parameters are now provided for a single element (#272) ### Fixed -- Fix color assignment for NaN values (#257) -- Zorder of rendering now strictly follows the order of the render_x calls (#244) +- Fix color assignment for NaN values (#257) +- Zorder of rendering now strictly follows the order of the render_x calls (#244) ## [0.2.2] - 2024-05-02 ### Fixed -- Fixed `fill_alpha` ignoring `alpha` channel from custom cmap (#236) -- Fix channel str support (#221) +- Fixed `fill_alpha` ignoring `alpha` channel from custom cmap (#236) +- Fix channel str support (#221) ## [0.2.1] - 2024-03-26 ### Minor -- Adjusted GitHub worklows +- Adjusted GitHub worklows ## [0.2.0] - 2024-03-24 ### Added -- Support for plotting multiple tables @melonora +- Support for plotting multiple tables @melonora ### Fixed -- Several bugfixes, especially for colors and palettes @melonora +- Several bugfixes, especially for colors and palettes @melonora ## [0.1.0] - 2024-01-17 ### Added -- Multiscale image handling: user can specify a scale, else the best scale is selected automatically given the figure size and dpi (#164) -- Large images are automatically rasterized to speed up performance (#164) -- Added better error message for mismatch in cs and ax number (#185) -- Beter test coverage for correct plotting of elements after transformation (#198) -- Can now stack render commands (#190, #192) -- The `color` argument in render_shapes/points now accepts actual colors as well (#199) -- Input arguments are now evaulated for their types in basic.py (#199) +- Multiscale image handling: user can specify a scale, else the best scale is selected automatically given the figure size and dpi (#164) +- Large images are automatically rasterized to speed up performance (#164) +- Added better error message for mismatch in cs and ax number (#185) +- Beter test coverage for correct plotting of elements after transformation (#198) +- Can now stack render commands (#190, #192) +- The `color` argument in render_shapes/points now accepts actual colors as well (#199) +- Input arguments are now evaulated for their types in basic.py (#199) ### Fixed -- Now dropping index when plotting shapes after spatial query (#177) -- Points are now being correctly rotated (#198) -- User can now pass Colormap objects to the cmap argument in render_images. When only one cmap is given for 3 channels, it is now applied to each channel (#188, #194) +- Now dropping index when plotting shapes after spatial query (#177) +- Points are now being correctly rotated (#198) +- User can now pass Colormap objects to the cmap argument in render_images. When only one cmap is given for 3 channels, it is now applied to each channel (#188, #194) ## [0.0.6] - 2023-11-06 ### Added -- Pushed `get_extent` functionality upstream to `spatialdata` (#162) +- Pushed `get_extent` functionality upstream to `spatialdata` (#162) ## [0.0.5] - 2023-10-02 ### Added -- Can now scale shapes (#152) -- Can now plot columns from GeoDataFrame (#149) +- Can now scale shapes (#152) +- Can now plot columns from GeoDataFrame (#149) ### Fixed -- Multipolygons are now handled correctly (#93) -- Legend order is now deterministic (#143) -- Images no longer normalised by default (#150) -- Filtering of shapes and points using the `groups` argument is now possible, coloring by palette and cmap arguments works for shapes and points (#153) -- Colorbar no longer autoscales to [0, 1] (#155) -- Plotting shapes after a spatial query is now possible (#163) +- Multipolygons are now handled correctly (#93) +- Legend order is now deterministic (#143) +- Images no longer normalised by default (#150) +- Filtering of shapes and points using the `groups` argument is now possible, coloring by palette and cmap arguments works for shapes and points (#153) +- Colorbar no longer autoscales to [0, 1] (#155) +- Plotting shapes after a spatial query is now possible (#163) ## [0.0.4] - 2023-08-11 ### Fixed -- Multi-scale images/labels are now correctly substituted and the action is logged (#131). -- Empty geometries among the shapes can be handeled (#133). -- `outline_width` parameter in render_shapes is now a float that actually determines the line width (#139). +- Multi-scale images/labels are now correctly substituted and the action is logged (#131). +- Empty geometries among the shapes can be handeled (#133). +- `outline_width` parameter in render_shapes is now a float that actually determines the line width (#139). ## [0.0.2] - 2023-06-25 ### Fixed -- Multiple bugfixes of which I didn't keep track of. +- Multiple bugfixes of which I didn't keep track of. ## [0.0.1] - 2023-04-04 ### Added -- Initial release of `spatialdata-plot` with support for `images`, `labels`, `points` and `shapes`. +- Initial release of `spatialdata-plot` with support for `images`, `labels`, `points` and `shapes`. diff --git a/README.md b/README.md index 5dc823a5..ba786da3 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ SpatialData’s plotting capabilities allow to quickly visualise all contained m For more information on the `spatialdata-plot` library, please refer to the [documentation](https://spatialdata.scverse.org/projects/plot/en/latest/index.html). In particular, the -- [API documentation][link-api]. -- [Example notebooks][link-notebooks] (section "Visiualizations") +- [API documentation][link-api]. +- [Example notebooks][link-notebooks] (section "Visiualizations") ## Installation diff --git a/docs/contributing.md b/docs/contributing.md index 66a84688..77e97aae 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -99,11 +99,11 @@ Specify `vX.X.X` as a tag name and create a release. For more information, see [ Please write documentation for new or changed features and use-cases. This project uses [sphinx][] with the following features: -- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text -- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension). -- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks)) -- [Sphinx autodoc typehints][], to automatically reference annotated input and output types -- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/) +- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text +- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension). +- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks)) +- [Sphinx autodoc typehints][], to automatically reference annotated input and output types +- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/) See the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information on how to write documentation. @@ -120,10 +120,10 @@ repository. #### Hints -- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only - if you do so can sphinx automatically create a link to the external documentation. -- If building the documentation fails because of a missing link that is outside your control, you can add an entry to - the `nitpick_ignore` list in `docs/conf.py` +- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only + if you do so can sphinx automatically create a link to the external documentation. +- If building the documentation fails because of a missing link that is outside your control, you can add an entry to + the `nitpick_ignore` list in `docs/conf.py` #### Building the docs locally From e10b83b3f72d7f9ba39613da5b5ea7b0b7ff5484 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 16:53:22 +0000 Subject: [PATCH 3/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CHANGELOG.md | 124 +++++++++++++++++++++++++-------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fe81d35..ef4f1bec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,167 +12,167 @@ and this project adheres to [Semantic Versioning][]. ### Fixed -- Transformations of Points and Shapes are now applied before rendering with datashader (#378) -- Fix bug due to `sc.get.obs_df()` returning a different type (#393) +- Transformations of Points and Shapes are now applied before rendering with datashader (#378) +- Fix bug due to `sc.get.obs_df()` returning a different type (#393) ## [0.2.8] - 2024-11-26 ### Changed -- Support for `xarray.DataTree` (which moved from `datatree.DataTree`) (#380) +- Support for `xarray.DataTree` (which moved from `datatree.DataTree`) (#380) ## [0.2.7] - 2024-10-24 ### Added -- The user can now specify `datashader_reduction` to control the rendering behavior (#309) -- Rendering outlines of shapes with datashader works now (#309) +- The user can now specify `datashader_reduction` to control the rendering behavior (#309) +- Rendering outlines of shapes with datashader works now (#309) ### Fixed -- datashader now uses canvas size = image size which speeds up the rendering (#309) -- datashader now uses the `linear` as interpolation method for colormaps instead of the default `eq_hist` to make it equivalent to matplotlib (#309) -- point sizes of datashader now agree with matplotlib also when dpi != 100 (#309) -- Giving a custom colormap when rendering a multiscale image now works (#586) +- datashader now uses canvas size = image size which speeds up the rendering (#309) +- datashader now uses the `linear` as interpolation method for colormaps instead of the default `eq_hist` to make it equivalent to matplotlib (#309) +- point sizes of datashader now agree with matplotlib also when dpi != 100 (#309) +- Giving a custom colormap when rendering a multiscale image now works (#586) ## [0.2.6] - 2024-09-04 ### Changed -- Lowered RMSE-threshold for plot-based tests from 45 to 15 (#344) -- When subsetting to `groups`, `NA` isn't automatically added to legend (#344) -- When rendering a single image channel, a colorbar is now shown (#346) -- Removed `percentiles_for_norm` parameter (#346) -- Changed `norm` to no longer accept bools, only `mpl.colors.Normalise` or `None` (#346) +- Lowered RMSE-threshold for plot-based tests from 45 to 15 (#344) +- When subsetting to `groups`, `NA` isn't automatically added to legend (#344) +- When rendering a single image channel, a colorbar is now shown (#346) +- Removed `percentiles_for_norm` parameter (#346) +- Changed `norm` to no longer accept bools, only `mpl.colors.Normalise` or `None` (#346) ### Fixed -- Filtering with `groups` now preserves original cmap (#344) -- Non-selected `groups` are now not shown in `na_color` (#344) -- Several issues associated with `norm` and `colorbar` (#346) +- Filtering with `groups` now preserves original cmap (#344) +- Non-selected `groups` are now not shown in `na_color` (#344) +- Several issues associated with `norm` and `colorbar` (#346) ## [0.2.5] - 2024-08-23 ### Changed -- Replaced `outline` parameter in `render_labels` with alpha-based logic (#323) -- Lowered RMSE-threshold for plot-based tests from 60 to 45 (#323) -- Removed `preprocessing` (.pp) accessor (#329) +- Replaced `outline` parameter in `render_labels` with alpha-based logic (#323) +- Lowered RMSE-threshold for plot-based tests from 60 to 45 (#323) +- Removed `preprocessing` (.pp) accessor (#329) ### Fixed -- Minor fixes for several tests as a result of the threshold change (#323) +- Minor fixes for several tests as a result of the threshold change (#323) ## [0.2.4] - 2024-08-07 ### Added -- Added utils function for 0-transparent cmaps (#302) +- Added utils function for 0-transparent cmaps (#302) ### Fixed -- Took RNG out of categorical label test (#306) -- Performance bug when plotting shapes (#298) -- scale parameter was ignored for single-scale images (#301) -- Changes to support for dask-expr (#283) -- Added error handling for non-existent elements (#305) -- Specifying vmin and vmax properly clips image data (#307) -- import bug `get_cmap()` (8fd969c) +- Took RNG out of categorical label test (#306) +- Performance bug when plotting shapes (#298) +- scale parameter was ignored for single-scale images (#301) +- Changes to support for dask-expr (#283) +- Added error handling for non-existent elements (#305) +- Specifying vmin and vmax properly clips image data (#307) +- import bug `get_cmap()` (8fd969c) ## [0.2.3] - 2024-07-03 ### Added -- Datashader support for points and shapes (#244) +- Datashader support for points and shapes (#244) ### Changed -- All parameters are now provided for a single element (#272) +- All parameters are now provided for a single element (#272) ### Fixed -- Fix color assignment for NaN values (#257) -- Zorder of rendering now strictly follows the order of the render_x calls (#244) +- Fix color assignment for NaN values (#257) +- Zorder of rendering now strictly follows the order of the render_x calls (#244) ## [0.2.2] - 2024-05-02 ### Fixed -- Fixed `fill_alpha` ignoring `alpha` channel from custom cmap (#236) -- Fix channel str support (#221) +- Fixed `fill_alpha` ignoring `alpha` channel from custom cmap (#236) +- Fix channel str support (#221) ## [0.2.1] - 2024-03-26 ### Minor -- Adjusted GitHub worklows +- Adjusted GitHub worklows ## [0.2.0] - 2024-03-24 ### Added -- Support for plotting multiple tables @melonora +- Support for plotting multiple tables @melonora ### Fixed -- Several bugfixes, especially for colors and palettes @melonora +- Several bugfixes, especially for colors and palettes @melonora ## [0.1.0] - 2024-01-17 ### Added -- Multiscale image handling: user can specify a scale, else the best scale is selected automatically given the figure size and dpi (#164) -- Large images are automatically rasterized to speed up performance (#164) -- Added better error message for mismatch in cs and ax number (#185) -- Beter test coverage for correct plotting of elements after transformation (#198) -- Can now stack render commands (#190, #192) -- The `color` argument in render_shapes/points now accepts actual colors as well (#199) -- Input arguments are now evaulated for their types in basic.py (#199) +- Multiscale image handling: user can specify a scale, else the best scale is selected automatically given the figure size and dpi (#164) +- Large images are automatically rasterized to speed up performance (#164) +- Added better error message for mismatch in cs and ax number (#185) +- Beter test coverage for correct plotting of elements after transformation (#198) +- Can now stack render commands (#190, #192) +- The `color` argument in render_shapes/points now accepts actual colors as well (#199) +- Input arguments are now evaulated for their types in basic.py (#199) ### Fixed -- Now dropping index when plotting shapes after spatial query (#177) -- Points are now being correctly rotated (#198) -- User can now pass Colormap objects to the cmap argument in render_images. When only one cmap is given for 3 channels, it is now applied to each channel (#188, #194) +- Now dropping index when plotting shapes after spatial query (#177) +- Points are now being correctly rotated (#198) +- User can now pass Colormap objects to the cmap argument in render_images. When only one cmap is given for 3 channels, it is now applied to each channel (#188, #194) ## [0.0.6] - 2023-11-06 ### Added -- Pushed `get_extent` functionality upstream to `spatialdata` (#162) +- Pushed `get_extent` functionality upstream to `spatialdata` (#162) ## [0.0.5] - 2023-10-02 ### Added -- Can now scale shapes (#152) -- Can now plot columns from GeoDataFrame (#149) +- Can now scale shapes (#152) +- Can now plot columns from GeoDataFrame (#149) ### Fixed -- Multipolygons are now handled correctly (#93) -- Legend order is now deterministic (#143) -- Images no longer normalised by default (#150) -- Filtering of shapes and points using the `groups` argument is now possible, coloring by palette and cmap arguments works for shapes and points (#153) -- Colorbar no longer autoscales to [0, 1] (#155) -- Plotting shapes after a spatial query is now possible (#163) +- Multipolygons are now handled correctly (#93) +- Legend order is now deterministic (#143) +- Images no longer normalised by default (#150) +- Filtering of shapes and points using the `groups` argument is now possible, coloring by palette and cmap arguments works for shapes and points (#153) +- Colorbar no longer autoscales to [0, 1] (#155) +- Plotting shapes after a spatial query is now possible (#163) ## [0.0.4] - 2023-08-11 ### Fixed -- Multi-scale images/labels are now correctly substituted and the action is logged (#131). -- Empty geometries among the shapes can be handeled (#133). -- `outline_width` parameter in render_shapes is now a float that actually determines the line width (#139). +- Multi-scale images/labels are now correctly substituted and the action is logged (#131). +- Empty geometries among the shapes can be handeled (#133). +- `outline_width` parameter in render_shapes is now a float that actually determines the line width (#139). ## [0.0.2] - 2023-06-25 ### Fixed -- Multiple bugfixes of which I didn't keep track of. +- Multiple bugfixes of which I didn't keep track of. ## [0.0.1] - 2023-04-04 ### Added -- Initial release of `spatialdata-plot` with support for `images`, `labels`, `points` and `shapes`. +- Initial release of `spatialdata-plot` with support for `images`, `labels`, `points` and `shapes`. From 2ffb791a4ab463e253392321ab4f18e56fb83c11 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Thu, 26 Dec 2024 18:22:37 +0100 Subject: [PATCH 4/5] fixed plotting datashader categorical column --- src/spatialdata_plot/pl/render.py | 7 ++++++- ...ints_categorical_color_column_datashader.png | Bin 0 -> 21293 bytes 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tests/_images/Points_points_categorical_color_column_datashader.png diff --git a/src/spatialdata_plot/pl/render.py b/src/spatialdata_plot/pl/render.py index 08b2094c..e85dfca1 100644 --- a/src/spatialdata_plot/pl/render.py +++ b/src/spatialdata_plot/pl/render.py @@ -525,7 +525,12 @@ def _render_points( # use datashader for the visualization of points cvs = ds.Canvas(plot_width=plot_width, plot_height=plot_height, x_range=x_ext, y_range=y_ext) - color_by_categorical = col_for_color is not None and points[col_for_color].values.dtype == object + color_by_categorical = col_for_color is not None and transformed_element[col_for_color].values.dtype in ( + object, + "categorical", + ) + if color_by_categorical and transformed_element[col_for_color].values.dtype == object: + transformed_element[col_for_color] = transformed_element[col_for_color].astype("category") aggregate_with_reduction = None if col_for_color is not None and (render_params.groups is None or len(render_params.groups) > 1): if color_by_categorical: diff --git a/tests/_images/Points_points_categorical_color_column_datashader.png b/tests/_images/Points_points_categorical_color_column_datashader.png new file mode 100644 index 0000000000000000000000000000000000000000..24e657035f5c9066783346b98b60b11f1aaf065d GIT binary patch literal 21293 zcmbrmWmr~G`zHzrNJ~j~cL>rY4HDAb-Q6Y9-3=loNFyyJUDDm%-3_yNXZ|yD&UNNG zALhezZQak~&b99KtJ|5Xe%JqKXg@kg?#y00#^99Mx}ifDMncn7Xr) zovE{%fujk8tbwz=wVkuIg&~QniKCN+oh=&^D+?0~1Btn_v%M1!GqcVA`~{PpqZxCe zqq-wF3cS6fh7$w?lHBVD($6iD90EcyO-l5WvU}#ylAF7-%KhK7ldNQ^ia_P~QFt`e zd^(>`v}AQELRG6|bmthVr8IReI;h%J1m3V$6H@yzh_^%MQw z11*`BmLan|aZ$bGZu=4iH^! zn>VOPD zy~KVp+S&vWSd6*N&6!Ontr>_+4PSMdTn#ufAZOeB1SfvVl2cL!g@+>~GiY@D_!Mya z{BW{2UJ#*{-G(}pj4o^ju3Kg2yO(XP%?STZCe-9&qf?Tiw2srz$6}>IIhB}^Ol~EO zGF6w&zPMtW5EMd1NJvP_=~4}q1w}gj}9&Ijmgdp4YTk~-JE z5c0YzSDTHL&p!{)SI`I%3V1iL%B#V(k=9oRmTNO%Yt`GDJl>v7)#-We6%;O=3^KPF z_r;Rd*e?CC)bjS`6A4CI1N%xmnxt(TkAj+dI06col{3n@h- zNNh-i)ygz$JB&X#fQz?WaB^~TXj&>kRyu^mr^-w*^Q6h$D z>#%wRR)4Bk1@ry;vt_Rnl_o`Qm3VYv<#>A39QwR5$qL;T_m`)e5*xprEH}BPmB0RP zG}?T9YB%k{u>@WoonTQ2)XNU5;R>{ePK5|fg0EHqU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- 1 file changed, 64 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef4f1bec..19393061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,167 +12,169 @@ and this project adheres to [Semantic Versioning][]. ### Fixed -- Transformations of Points and Shapes are now applied before rendering with datashader (#378) -- Fix bug due to `sc.get.obs_df()` returning a different type (#393) +- Transformations of Points and Shapes are now applied before rendering with datashader (#378) +- Fix bug due to `sc.get.obs_df()` returning a different type (#393) +- Allowing instance mismatch between shapes and tables (#396) +- Fix bug when plotting categorical points with datashader (#395) ## [0.2.8] - 2024-11-26 ### Changed -- Support for `xarray.DataTree` (which moved from `datatree.DataTree`) (#380) +- Support for `xarray.DataTree` (which moved from `datatree.DataTree`) (#380) ## [0.2.7] - 2024-10-24 ### Added -- The user can now specify `datashader_reduction` to control the rendering behavior (#309) -- Rendering outlines of shapes with datashader works now (#309) +- The user can now specify `datashader_reduction` to control the rendering behavior (#309) +- Rendering outlines of shapes with datashader works now (#309) ### Fixed -- datashader now uses canvas size = image size which speeds up the rendering (#309) -- datashader now uses the `linear` as interpolation method for colormaps instead of the default `eq_hist` to make it equivalent to matplotlib (#309) -- point sizes of datashader now agree with matplotlib also when dpi != 100 (#309) -- Giving a custom colormap when rendering a multiscale image now works (#586) +- datashader now uses canvas size = image size which speeds up the rendering (#309) +- datashader now uses the `linear` as interpolation method for colormaps instead of the default `eq_hist` to make it equivalent to matplotlib (#309) +- point sizes of datashader now agree with matplotlib also when dpi != 100 (#309) +- Giving a custom colormap when rendering a multiscale image now works (#586) ## [0.2.6] - 2024-09-04 ### Changed -- Lowered RMSE-threshold for plot-based tests from 45 to 15 (#344) -- When subsetting to `groups`, `NA` isn't automatically added to legend (#344) -- When rendering a single image channel, a colorbar is now shown (#346) -- Removed `percentiles_for_norm` parameter (#346) -- Changed `norm` to no longer accept bools, only `mpl.colors.Normalise` or `None` (#346) +- Lowered RMSE-threshold for plot-based tests from 45 to 15 (#344) +- When subsetting to `groups`, `NA` isn't automatically added to legend (#344) +- When rendering a single image channel, a colorbar is now shown (#346) +- Removed `percentiles_for_norm` parameter (#346) +- Changed `norm` to no longer accept bools, only `mpl.colors.Normalise` or `None` (#346) ### Fixed -- Filtering with `groups` now preserves original cmap (#344) -- Non-selected `groups` are now not shown in `na_color` (#344) -- Several issues associated with `norm` and `colorbar` (#346) +- Filtering with `groups` now preserves original cmap (#344) +- Non-selected `groups` are now not shown in `na_color` (#344) +- Several issues associated with `norm` and `colorbar` (#346) ## [0.2.5] - 2024-08-23 ### Changed -- Replaced `outline` parameter in `render_labels` with alpha-based logic (#323) -- Lowered RMSE-threshold for plot-based tests from 60 to 45 (#323) -- Removed `preprocessing` (.pp) accessor (#329) +- Replaced `outline` parameter in `render_labels` with alpha-based logic (#323) +- Lowered RMSE-threshold for plot-based tests from 60 to 45 (#323) +- Removed `preprocessing` (.pp) accessor (#329) ### Fixed -- Minor fixes for several tests as a result of the threshold change (#323) +- Minor fixes for several tests as a result of the threshold change (#323) ## [0.2.4] - 2024-08-07 ### Added -- Added utils function for 0-transparent cmaps (#302) +- Added utils function for 0-transparent cmaps (#302) ### Fixed -- Took RNG out of categorical label test (#306) -- Performance bug when plotting shapes (#298) -- scale parameter was ignored for single-scale images (#301) -- Changes to support for dask-expr (#283) -- Added error handling for non-existent elements (#305) -- Specifying vmin and vmax properly clips image data (#307) -- import bug `get_cmap()` (8fd969c) +- Took RNG out of categorical label test (#306) +- Performance bug when plotting shapes (#298) +- scale parameter was ignored for single-scale images (#301) +- Changes to support for dask-expr (#283) +- Added error handling for non-existent elements (#305) +- Specifying vmin and vmax properly clips image data (#307) +- import bug `get_cmap()` (8fd969c) ## [0.2.3] - 2024-07-03 ### Added -- Datashader support for points and shapes (#244) +- Datashader support for points and shapes (#244) ### Changed -- All parameters are now provided for a single element (#272) +- All parameters are now provided for a single element (#272) ### Fixed -- Fix color assignment for NaN values (#257) -- Zorder of rendering now strictly follows the order of the render_x calls (#244) +- Fix color assignment for NaN values (#257) +- Zorder of rendering now strictly follows the order of the render_x calls (#244) ## [0.2.2] - 2024-05-02 ### Fixed -- Fixed `fill_alpha` ignoring `alpha` channel from custom cmap (#236) -- Fix channel str support (#221) +- Fixed `fill_alpha` ignoring `alpha` channel from custom cmap (#236) +- Fix channel str support (#221) ## [0.2.1] - 2024-03-26 ### Minor -- Adjusted GitHub worklows +- Adjusted GitHub worklows ## [0.2.0] - 2024-03-24 ### Added -- Support for plotting multiple tables @melonora +- Support for plotting multiple tables @melonora ### Fixed -- Several bugfixes, especially for colors and palettes @melonora +- Several bugfixes, especially for colors and palettes @melonora ## [0.1.0] - 2024-01-17 ### Added -- Multiscale image handling: user can specify a scale, else the best scale is selected automatically given the figure size and dpi (#164) -- Large images are automatically rasterized to speed up performance (#164) -- Added better error message for mismatch in cs and ax number (#185) -- Beter test coverage for correct plotting of elements after transformation (#198) -- Can now stack render commands (#190, #192) -- The `color` argument in render_shapes/points now accepts actual colors as well (#199) -- Input arguments are now evaulated for their types in basic.py (#199) +- Multiscale image handling: user can specify a scale, else the best scale is selected automatically given the figure size and dpi (#164) +- Large images are automatically rasterized to speed up performance (#164) +- Added better error message for mismatch in cs and ax number (#185) +- Beter test coverage for correct plotting of elements after transformation (#198) +- Can now stack render commands (#190, #192) +- The `color` argument in render_shapes/points now accepts actual colors as well (#199) +- Input arguments are now evaulated for their types in basic.py (#199) ### Fixed -- Now dropping index when plotting shapes after spatial query (#177) -- Points are now being correctly rotated (#198) -- User can now pass Colormap objects to the cmap argument in render_images. When only one cmap is given for 3 channels, it is now applied to each channel (#188, #194) +- Now dropping index when plotting shapes after spatial query (#177) +- Points are now being correctly rotated (#198) +- User can now pass Colormap objects to the cmap argument in render_images. When only one cmap is given for 3 channels, it is now applied to each channel (#188, #194) ## [0.0.6] - 2023-11-06 ### Added -- Pushed `get_extent` functionality upstream to `spatialdata` (#162) +- Pushed `get_extent` functionality upstream to `spatialdata` (#162) ## [0.0.5] - 2023-10-02 ### Added -- Can now scale shapes (#152) -- Can now plot columns from GeoDataFrame (#149) +- Can now scale shapes (#152) +- Can now plot columns from GeoDataFrame (#149) ### Fixed -- Multipolygons are now handled correctly (#93) -- Legend order is now deterministic (#143) -- Images no longer normalised by default (#150) -- Filtering of shapes and points using the `groups` argument is now possible, coloring by palette and cmap arguments works for shapes and points (#153) -- Colorbar no longer autoscales to [0, 1] (#155) -- Plotting shapes after a spatial query is now possible (#163) +- Multipolygons are now handled correctly (#93) +- Legend order is now deterministic (#143) +- Images no longer normalised by default (#150) +- Filtering of shapes and points using the `groups` argument is now possible, coloring by palette and cmap arguments works for shapes and points (#153) +- Colorbar no longer autoscales to [0, 1] (#155) +- Plotting shapes after a spatial query is now possible (#163) ## [0.0.4] - 2023-08-11 ### Fixed -- Multi-scale images/labels are now correctly substituted and the action is logged (#131). -- Empty geometries among the shapes can be handeled (#133). -- `outline_width` parameter in render_shapes is now a float that actually determines the line width (#139). +- Multi-scale images/labels are now correctly substituted and the action is logged (#131). +- Empty geometries among the shapes can be handeled (#133). +- `outline_width` parameter in render_shapes is now a float that actually determines the line width (#139). ## [0.0.2] - 2023-06-25 ### Fixed -- Multiple bugfixes of which I didn't keep track of. +- Multiple bugfixes of which I didn't keep track of. ## [0.0.1] - 2023-04-04 ### Added -- Initial release of `spatialdata-plot` with support for `images`, `labels`, `points` and `shapes`. +- Initial release of `spatialdata-plot` with support for `images`, `labels`, `points` and `shapes`.