From 6dabccd6b0c5b4546f961e44ff8059858746df25 Mon Sep 17 00:00:00 2001 From: Luca Simi Date: Tue, 27 May 2025 07:00:11 +0200 Subject: [PATCH] Improved docs. Updated version --- pyproject.toml | 2 +- src/tdamapper/_plot_plotly.py | 2 +- src/tdamapper/plot.py | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e6025ec..c07e8b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "tda-mapper" -version = "0.11.0" +version = "0.11.1" description = "A simple and efficient Python implementation of Mapper algorithm for Topological Data Analysis" readme = "README.md" authors = [{ name = "Luca Simi", email = "lucasimi90@gmail.com" }] diff --git a/src/tdamapper/_plot_plotly.py b/src/tdamapper/_plot_plotly.py index 77790a6..55ed41a 100644 --- a/src/tdamapper/_plot_plotly.py +++ b/src/tdamapper/_plot_plotly.py @@ -57,7 +57,7 @@ def plot_plotly( mapper_plot, width: int, height: int, - node_size: Optional[Union[int, List[int]]] = DEFAULT_NODE_SIZE, + node_size: Optional[Union[int, float, List[Union[int, float]]]] = DEFAULT_NODE_SIZE, colors=None, title: Optional[Union[str, List[str]]] = None, agg=np.nanmean, diff --git a/src/tdamapper/plot.py b/src/tdamapper/plot.py index 11831f7..860e9dc 100644 --- a/src/tdamapper/plot.py +++ b/src/tdamapper/plot.py @@ -167,8 +167,10 @@ def plot_plotly( node in the graph, useful for highlighting different features of the data. :type colors: array-like of shape (n,) or list-like of size n - :param node_size: A scaling factor for node size. Defaults to 1. - :type node_size: float, optional + :param node_size: A scaling factor for node size. When node_size is a + list, the figure will display a slider with the specified values. + Defaults to 1. + :type node_size: int, float or list, optional :param agg: A function used to aggregate the `colors` array over the points within a single node. The final color of each node is obtained by mapping the aggregated value with the colormap `cmap`.