Figures
Abstract
Visualizing two-dimensional data projections with group-wise coloring and confidence ellipses is a standard approach in biomedical data analysis. However, this method can obscure subtle group overlaps or atypical cases. Voronoi tessellation, which is widely used in crystallography to analyze local structure, offers a parameter-free geometric alternative that can improve the evaluation of group structure in raw or projected data. We implemented Voronoi tessellation as a plot type for two-dimensional biomedical data and compared it with confidence ellipses on three artificial datasets and three biomedical datasets. For datasets with well-separated classes, both visualization techniques effectively delineated groups. Voronoi tessellation more clearly highlighted cases with points overlapping the opposite group, revealed internal group heterogeneity, and enabled quantification of structural discordance via a Voronoi island count as a visualization-intrinsic metric with no equivalent in confidence ellipse approaches. In datasets with moderate or absent group separation, Voronoi tessellation more effectively exposed the lack of meaningful structure, whereas confidence ellipses more clearly indicated distant outliers. Voronoi tessellation also facilitated the identification of clustering failures. Thus, Voronoi tessellation enhances the detection of deviations from expected group patterns and provides geometric insights that complement statistical summaries from confidence ellipses. Therefore, integrating Voronoi tessellation into standard data analysis workflows is a valuable addition for visualizing biomedical data and supports hypothesis validation and exploratory analyses in both raw data visualization and dimensionality reduction or clustering. An R library “VoronoiBiomedPlot” is available at the Comprehensive R Archive Network (CRAN) at https://cran.r-project.org/package=VoronoiBiomedPlot.
Citation: Lötsch J, Kringel D (2026) Voronoi tessellation as a complement or replacement for confidence ellipses in the visualization of data projection and clustering results. PLoS One 21(4): e0333653. https://doi.org/10.1371/journal.pone.0333653
Editor: Jefferson Stafusa Elias Portela, Julius-Maximilians-Universitat Wurzburg, GERMANY
Received: September 16, 2025; Accepted: March 18, 2026; Published: April 24, 2026
Copyright: © 2026 Lötsch, Kringel. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: All data underlying the results presented in this study are publicly available and properly referenced within the article. Key datasets, including those used to generate the artificial data series, together with the corresponding code, are archived in the project’s permanent the EU Open Research Repository Zenodo (https://doi.org/10.5281/zenodo.18954701). The R scripts used for analysis are available both in this Zenodo repository and as the R package “VoronoiBiomedPlot”, which can be accessed via the Comprehensive R Archive Network (CRAN) at https://cran.r-project.org/package=VoronoiBiomedPlot.
Funding: JL was supported by the Deutsche Forschungsgemeinschaft (DFG LO 612/16-1). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors have declared that no competing interests exist.
Introduction
Projecting data and inspecting group separation are standard parts of biomedical data analysis workflows. Unsupervised or supervised techniques, such as principal component analysis (PCA [1,2]) or partial least squares discriminant analysis (PLS-DA [3]), respectively, are among commonly used methods to investigate study group separation, with many further methodological alternatives [4]. Consequently, standard software implementations, whether in data science-oriented languages such as R [5] or Python [6], as well as commercial biomedical data analysis packages, offer data projections onto the two-dimensional plane with group-wise coloring of points. The projection of subgroups into specific regions is emphasized via confidence ellipses.
The Voronoi tessellation of the two-dimensional projection plane offers an alternative to confidence ellipses, as we have previously demonstrated in a variety of datasets [4]. Voronoi tessellation is a well-established tool in crystal structure research, where it facilitates the analysis of local atomic arrangements, grain boundaries, and phase transitions [7]. By defining neighbor relations through the identification of shared facets between Voronoi cells, this method provides a parameter-free approach to investigating local structure and nucleation processes in supercooled liquids [8]. Given these capabilities, Voronoi tessellation is well-suited to enhance the (visual) assessment of relationships among individual cases within complex group structures in diverse data sets. Its advantages include quicker visual identification of concentrations of the study group and disruptions to the expected color pattern in the Voronoi tessellation. However, further consideration is needed to determine if Voronoi cell-based projections could replace standard confidence ellipse visualizations and be included as the default in omics analysis software [9]. Therefore, following the successful proof of concept [4], the present report focused on systematic comparison with classical confidence ellipses, along with the introduction of a measure to quantify structural discordance via a Voronoi island count and implementation in an R package.
Methods
Confidence ellipses
Confidence ellipses illustrate the uncertainty or variability associated with group means in two dimensions. Mathematically, a confidence ellipse is a two-dimensional generalization of a confidence interval and is typically constructed under the assumption that the data within each group follows a bivariate normal distribution. For a group of projected points with a mean vector μ and a covariance matrix , the confidence ellipse for a specified confidence level (e.g., 95%) is defined as the set of points satisfying the equation
where is a constant determined by the desired confidence level and related to the quantile of the chi-squared distribution with two degrees of freedom [10].
Geometrically, the confidence ellipse is centered at the group mean, and its axes are aligned with the principal directions of the covariance matrix. The lengths of the axes reflect variability in each direction. A circular ellipse indicates equal variance in both dimensions (uncorrelated variables), while an elongated ellipse indicates higher variance in one direction (correlated variables). The area inside the ellipse represents the region where the true group mean would fall with the specified probability (e.g., 95%) if the experiment were repeated many times.
Voronoi cells
Voronoi cells [11] are defined as follows. Let be a set of
distinct points in a metric space
with a distance function
defined for all
. The Voronoi tessellation partitions
into
regions, called Voronoi cells, each associated with a point
.
The Voronoi cell corresponding to the point
is defined as:
The definition of the Voronoi cell means that for any point
in the domain
will be assigned to the cell of the point
to which it is closest, according to the distance function
. Formally,
if and only if
. This ensures that the entire space
is divided into non-overlapping regions, each region containing all points that are closest to a specific center
.
Geometrically, the boundaries between Voronoi cells are formed by the set of points equidistant from two or more centers. In the case of standard Euclidean distance in two dimensions, for example, these boundaries are straight lines, or perpendicular bisectors, between pairs of points. In higher dimensions, the boundaries become hyperplanes. Thus, Voronoi tessellations naturally partition space based on proximity to a given set of points.
Implementation
The visualization based on Voronoi cell tessellation of the projection plane [4] functions similarly to a “political map”. Specifically, data projections are visualized by plotting data points in a two-dimensional plane. Each point is colored according to its prior classification. Then, Voronoi cells are computed around each data point, and these cells are colored according to the same class labels. Alternatively, the coloring can reflect different classes, such as those resulting from clustering, prior classifications, or study hypotheses.
The resulting plot shows each Voronoi cell colored by class, with the original points overlaid. This allows for an intuitive visual assessment of class separation. Optionally, the cells can be colored according to an alternative classification, such as clustering. This is useful for visually judging the clustering success when contrasting it with prior classification. The code includes two functions. The more complete function, “create_tesselation_plots” produces three types of plots, including confidence ellipses, Voronoi tessellation, or a combination of both, whereas the reduced function, “create_voronoi_plot”, creates only the colored Voronoi cell variant that is the focus of this report. The detailed function call is described in the R code and its description provided at https://github.com/JornLotsch/voronoi_tesselation_plot, with the corresponding archived release on the EU Open Research Repository Zenodo (https://doi.org/10.5281/zenodo.18954701). The main function calls and parameters are also shown in Textbox 1 and Table 1 respectively.
To provide a visualization-intrinsic quantitative measure of class structure disruption, we introduce the Voronoi island count. A Voronoi island is defined as a data point whose Voronoi cell is entirely surrounded by cells belonging to a different class, i.e., every Voronoi neighbor of the point belongs to a class other than its own. This definition is motivated by the observation that such a cell constitutes the strongest possible local signal of class discordance visible in the tessellation: the point is isolated within foreign-class territory. This metric is intrinsic to the tessellation geometry and has no equivalent counterpart in confidence ellipse visualizations, making it a measure of what Voronoi tessellation uniquely adds. Neighbor relationships are determined from the Delaunay triangulation [12] embedded in the “deldir” output (the “dirsgs” component), which is the geometric dual of the Voronoi tessellation: two Voronoi cells share an edge if and only if their corresponding points are connected by a Delaunay edge. Island detection therefore requires no additional computation beyond the tessellation itself. The result is summarized as an island count (absolute number of island cells) and an island rate (proportion of all cells that are islands). When the parameter “show_island_count = TRUE” is passed to the “create_voronoi_plot” function, the island count and rate are displayed as a plot subtitle. The island count is computed using the same classification as determines the Voronoi cell colors (“fill_voronoi” parameter), ensuring the metric is truly visualization-intrinsic and describes the tessellation structure that is actually visible to the viewer. When “fill_voronoi = ‘primary’” (default), islands are identified based on “class_column”; when “fill_voronoi = ‘alternative’”, islands are identified based on “alternative_class_column”. To make the islands more visible, the “label_islands_only” parameter can be toggled to add labels only to cases identified as Voronoi islands.
An R library “VoronoiBiomedPlot” is available at the Comprehensive R Archive Network (CRAN) at https://cran.r-project.org/package=VoronoiBiomedPlot. And can be installed from there or from the GitHub repository (https://github.com/JornLotsch/VoronoiBiomedPlot) via the command “remotes::install_github(“JornLotsch/VoronoiBiomedPlot”)”.
Data sets
Artificial data.
Two-class synthetic benchmark data set: The synthetic dataset comprises nine variables acquired from n = 80 cases from two different classes, and C₂ (n₂ = 40). Each observation is represented as a vector in ℝ⁹, corresponding to nine continuous variables with varying degrees of class separation. Variables
and
are sampled from normal distributions with class-specific parameters. For variable
, the distribution within class
is
, where
and
. Variable
is generated using scaled and cross-referenced parameters, i.e.,
for class
and
for class
, creating an inverse relationship between classes. Variables
and
are drawn from uniform distributions
for each class
, where the bounds are derived from jittered class-specific mean values to ensure class separation. Variables
and
are constructed via weighted sampling from sequential values and subsequent jittering, introducing moderate variability with partial class overlap. Variables
and
are sampled from a common uniform distribution across all classes, with variable
being a jittered linear transformation of
. Data set generation details are available via the R code file “Two_class_artifical_data_example.R” on the report’s public repository.
An alternative version of this dataset was created in which the class labels of three cases in each group were reassigned to the opposite class. This modification introduced controlled misclassification, enabling the evaluation of visualization methods under conditions of label noise and their ability to identify atypical or mislabeled instances within well-separated groups.
Three-class synthetic data sets in a significant and a non-significant variant: The second synthetic data set also comprises nine variables, this time acquired from n = 75 cases from three different classes, ,
and
. Each observation is again represented as a vector in
. Variables
and
are sampled from normal distributions with class-specific parameters. For variable
, the distribution within class
is
, where
and
. Variable
is generated analogously, using scaled versions of the same parameters. Variables
and
are drawn from uniform distributions
for each class
. Variables
and
are constructed via weighted and jittered sampling from uniform distributions, introducing moderate variability and partial class overlap. Variables
and
are sampled from a common uniform distribution across all classes with minimal class discrimination. In the present random realization of the data set, group differences happened to be significant at p < 0.05, according to Kruskal-Wallis tests [13], for variables
and
. Data set generation details are available via the R code file “Three_class_artifical_data_example.R” on the report’s public repository.
An alternative version of the above data set without significant group differences (all Kruskal-Wallis tests: p > 0.05) was generated by independently permuting each variable in the original dataset, thus destroying the association between the variables and class membership.
Clustering problem data set: The data set used to illustrate the limitations of clustering algorithms such as k-means was taken from the Fundamental Clustering Problems Suite (FCPS), a benchmark collection designed to expose common challenges encountered in real-world clustering tasks [14]. The FCPS suite includes artificial datasets constructed to highlight specific structural difficulties for clustering algorithms, such as varying cluster shapes, densities, and separations. Selected for this study, the two-dimensional “Lsun” dataset comprises 400 samples distributed across three well-separated classes. These classes differ markedly in their geometric properties: one forms a roughly spherical cluster, while the other two are rectangular (“brick-shaped”) and vary in size. This configuration introduces varying cluster variances and densities, presenting a significant challenge for algorithms like k-means [15,16], which assumes that clusters are hyperspheric and therefore perform poorly on the “Lsun” dataset [17]. The clustering demonstration was done using the “kmeans” function from the R “stats” core package, setting the parameters centers = 3 (the original class number in the “Lsun” dataset) and nstart = 100; for details, see the R code file “Lsun_example.R” on the report’s permanent public repository.
Biomedical data.
Sensitivity to experimental nociceptive stimuli (“QSTpainEJPtransf”): This psychophysical pain-related dataset (“QSTpainEJP” [18]) was available from an in-house study on clinical quantitative sensory testing (QST) involving 127 healthy subjects [19]. The data set includes 22 sensory measures of pain, i.e., nine from classical pain models (e.g., pressure, cold, electric, chemical and laser-evoked pain thresholds and intensities), and ten from a clinically established QST battery [20]. The QST parameters encompass a range of thermal and mechanical pain and sensation thresholds. Measures were harmonized to ensure that higher values indicate greater pain and were log-transformed as appropriate. Detailed protocols and variable descriptions are available in the original publications.
For the present purpose of data visualization, only the n = 72 complete cases were projected to avoid imputation of missing’s (34 men and 38 women). Since sex differences in pain are a widely reported observation [21,22], sex was used as the data set’s class structure for the present purpose (coding: 1 = male, 2 = female). For details, see the R code “pain_data_example.R” on the report’s public repository.
Clinical lipidomics of rheumatic diseases (“PsA_lipidomics”): This lipidomics dataset (“PsA_lipidomics” [23]; https://doi.org/10.17632/32xts2zxdc.1) includes plasma lipid profiles from 81 patients diagnosed with psoriatic arthritis (PsA) and 26 healthy control subjects matched by age and sex. This results in a data matrix of 107 subjects and 292 lipid markers [24]. Samples were collected as part of a cross-sectional study at a university-based tertiary care rheumatology center. Both targeted and untargeted assays were employed to capture a broad spectrum of lipid classes, including carnitines, ceramides, glycerophospholipids, sphingolipids, glycerolipids, fatty acids, sterols, esters, and endocannabinoids.
During analysis, a subset of control samples was observed to cluster anomalously with PsA patients. Further investigation revealed that these outliers were due to batch effects; control samples processed in separate batches exhibited divergent data projections, indicating insufficient normalization and batch correction. These characteristics made the dataset suitable for comparing standard confidence ellipse plots with the proposed Voronoi tessellation approach, with a focus on identifying and interpreting problematic or mislabeled cases. Additional methodological details can be found at https://data.mendeley.com/datasets/9v8ndhctvz/1. The data set’s processing for this report was similar to that of the above pain-related data set (see R code “PsA_data_example.R” on the report’s public repository.
COVID-19 metabolomics data set (“covid_metabolomics”): Another example was processed using the MetaboAnalyst 6.0 web-based platform [9], which is a comprehensive tool for metabolomics data analysis available at https://www.metaboanalyst.ca/. Specifically, an online statistical analysis was performed at https://dev.metaboanalyst.ca/MetaboAnalyst/upload/MultifacUploadView.xhtml on liquid chromatography-mass spectrometry (LC-MS) peak intensity data from 59 samples, including 20 healthy controls and 39 patients with SARS-CoV-2 infection (data from https://api2.xialab.ca/api/download/metaboanalyst/covid_metabolomics_data.csv, metadata from https://api2.xialab.ca/api/download/metaboanalyst/covid_metadata_multiclass.csv).
This resulted in a data matrix of 59 samples by 2,054 peaks (m/z and retention time). Four metadata factors were included: Diagnosis, Gender, Treatment, and Age. Data preprocessing involved variance filtering using a nonparametric relative standard deviation (median absolute deviation normalized by median), abundance filtering based on median intensity values, median normalization, and autoscaling (mean-centering followed by division by the standard deviation of each variable). The platform’s interactive PCA was conducted, and the resulting loading data was downloaded and plotted for the present analysis.
Experimentation
Coding was done in the R language (Ihaka and Gentleman 1996) using the R software package (R Development Core Team 2008), version 4.5.0 for Linux, with the PyCharm integrated development environment (version 2025.1.1.1; Professional Edition; JetBrains c.r.o., Prague, Czech Republic), which provides an AI Assistant plugin (https://plugins.jetbrains.com/plugin/22282-jetbrains-ai-assistant, version 251.26094.80.11 for original coding, and 253.29346.420 for the revision of the manuscript), which was used on own previous code [4]. The R code uses the “deldir” R package (https://cran.r-project.org/package=deldir [25]) to compute the Voronoi tessellation of a set of two-dimensional points and assign each cell to a class. This is a novel replacement for the now-obsolete R package previously used [4], so the present code reintroduces easy generation of Voronoi tessellations for biomedical researchers. The R package “ggplot2” (https://cran.r-project.org/package=ggplot2 [26]) was used for plotting, with a colorblind-friendly palette originally taken from the “ggthemes” R package [27]).
The Voronoi tessellation-based visualization method was tested on the datasets mentioned above. Experiments included plotting the raw data for low-dimensional datasets, such as the artificial FCPS::LSun dataset (see below), or after applying a few standard projection techniques, including principal component analysis (PCA [1,2]), partial least squares discriminant analysis (PLS-DA [3]), and occasionally Uniform Manifold Approximation and Projection (UMAP [28]). PCA and PLS-DA were implemented using the R package “mixOmics” (https://www.bioconductor.org/packages/release/bioc/html/mixOmics.html [29]), and UMAP was implemented using the R package “umap” (https://cran.r-project.org/package=umap [30]) with default parameters. In addition, clustering was performed on either unprojected (“LSun”, see below) or projected data, using k-means (with the parameter nstart = 100) and single-linkage hierarchical clustering as examples, chosen based on prior experience with some of the datasets in previous work such as [17].
Results
Visualization of clear class structures
In data sets with two classes that are clearly separated on the plane of a PLS-DA projection (Fig 1), visualization using confidence ellipses is adequate (Fig 1A). Notably, the Voronoi tessellation provides an equally clear alternative (Fig 1B), supporting its suitability as a visualization method comparable to the current standard. However, when three points per class are switched to the respective opposite class, the irregularity may escape attention in the ellipses plot (Fig 1C), but it is clearly evident in the Voronoi tessellated plot (Fig 1D).
A: Standard 95% confidence ellipse visualization on the plane with color coding for the original (prior) classes. B: The same projection as in panel A, but with Voronoi tessellation instead of confidence ellipses. C and D: Introduction of class aberrations: Three instances per class were assigned to the opposite class, after which the PLS-DA projection was repeated. This resulted in only minor changes to the projection. However, panels C and D demonstrate the visualization of the aberrant cases, which are almost hidden in C and very clear in D.
The Voronoi island count quantifies this observation: in the label-switched dataset (Fig 1D), four islands were detected (island rate: 5.0%). The remaining two switched cases, although visually discordant, retained at least one same-class Voronoi neighbor due to their proximity to the group boundary and therefore do not qualify as islands. This distinction is informative: the tessellation correctly differentiates between fully enclosed discordant cases, which is the strongest signal, and boundary-adjacent discordant cases, which are visible in the plot but represent a weaker form of discordance. The island count thus complements visual inspection rather than replacing it.
Performance in complex and ambiguous separation scenarios
In more complex scenarios where three groups differ to varying degrees across several variables, both Voronoi tessellation and confidence ellipses provide consistent visualizations (Fig 2A and B). The tessellated plot (Fig 2B) may reveal slightly more pronounced group segregation, but it does not clearly outperform the confidence ellipse plot in clarity. However, when the dataset is permuted, confidence ellipses become less decisive in indicating the now absent significant group segregation (Fig 2C and D). This leaves both segregated and non-segregated group structures as possible interpretations (Fig 2C). In contrast, Voronoi tessellation clearly shows the lack of meaningful group segregation in the permuted data. The cells disperse across the plane without any evident concentration or pattern (Fig 2D). Thus, Voronoi tessellation appears superior in distinctly conveying the absence of group structure in ambiguous cases.
A: Standard 95% confidence ellipse visualization on the plane, with color coding for the original classes in the significant data scenario. B: The same projection as in panel A, but with Voronoi tessellation instead of confidence ellipses. C and D: Results of PLS-DA projection following randomly permuting each variable to make the class differences non-significant.
Detection of Voronoi islands and outliers in biomedical data
A more detailed visualization of group structure is achieved using Voronoi tessellation in the biomedical, pain-related “QSTpainEJP” data set (Fig 3). The separation of groups defined by sex is evident in both displays of the PLS-DA projection (Fig 3 top row of panels). Standard outliers, such as cases #1356, 1365, 1375, 1382, and 1474, can be easily identified when case labeling is enabled (see Textbox 1), as they are significantly distant from the primary clusters. In the Voronoi tessellation, additional cases (#1299, 1378, and 1451) appear as Voronoi islands: their cells are entirely enclosed within the opposite sex’s territory, with every Voronoi neighbor belonging to the other group. Unlike standard outliers that are simply distant from all clusters, Voronoi islands signal class discordance within the interior of the projection and may indicate data or laboratory errors, novel phenotypes, or unconsidered conditions, necessitating further investigation. The alternative UMAP projection provided a less distinct separation of the pain data by sex (Fig 3, bottom row of panels). This further emphasizes the utility of the present visualization method for obtaining a quick and intuitive overview of a given data projection and its associated class separation. That is, the scattered, interleaved Voronoi cell pattern in the UMAP panels is itself a diagnostic signal, indicating that the projection does not strongly support the posited class structure. The Voronoi island count provides a quantitative summary of this pattern: 2 islands (2.8%) were identified in the PLS-DA projection (Fig 3 top row of panels), corresponding to cases whose cells were entirely enclosed within the opposite sex’s territory. In the UMAP projection, which provided weaker overall sex-based separation, the island count increased to 4 (5.6%), consistent with the greater intermixing of cell territories visible in panels (Fig 3D–F).
Individual cases are labeled to enable follow-up analysis at the single-case level. A: Standard confidence ellipses on the plane with color coding for sex groups. B: shows the same projection as panel A, but with Voronoi tessellation instead of confidence ellipses. C: Combined visualization of both approaches. D – F: Similar visualization as in panels A – C, but with UMAP projection.
A similar pattern emerged in the analysis of the “PsA_lipidomics” dataset, where PLS-DA projections revealed irregularities in the group structure due to batch effects (Fig 4). Notably, several PsA patient samples were scattered among the healthy controls, while most patients clustered together as expected. The Voronoi tessellation more clearly highlighted this dispersion than confidence ellipse visualizations did, and three Voronoi islands (2.8%) were identified: control samples whose cells were entirely enclosed within PsA patient territory. Controls such as #K112, K111, and K120 projected at the periphery of their group or in proximity to patient samples and corresponded to cases with known batch normalization issues. As these cases were subsequently attributed to batch effects rather than true biological similarity with patients, the island count here reflects a data quality signal rather than a biological finding, illustrating that the same metric can flag both types of discordance depending on context.
Individual cases are labeled to enable follow-up analysis at the single-case level. A: Standard confidence ellipses on the plane with color coding for diagnostic groups. B: The same projection as panel A, but with Voronoi tessellation. The controls (ID code starting with “K”) projected among PsA patients (grey spots within a yellow zone) are among cases with failed laboratory batch correction. C: Combined visualization of both approaches. The Voronoi tessellation plots demonstrate the effect of the parameter “label_islands_only”.
The “covid_metabolomics” dataset further demonstrated the advantages of Voronoi tessellation over standard visualization techniques for analyzing the effects of SARS-CoV-2 on metabolism (Fig 5). Although group separation between patients with and without the disease was apparent in the PCA projection, the Voronoi tessellation provided clearer identification of outliers and Voronoi islands whose projections overlapped with the opposite class. These observations are consistent with those from other biomedical datasets. Please also compare the default plot style from the “MetaboAnalyst” platform in Fig 5D. It should also be noted that the analysis of this dataset was primarily conducted to create a plot suitable for the current presentation. To generate scientifically valid results on the metabolomic pattern of patients with COVID-19, the data processing steps and resulting projections may differ.
Individual cases are labeled to enable follow-up analysis at the single-case level. The data processing and PCA had been performed directly at the MetaboAnalyst 6.0 web site at https://www.metaboanalyst.ca/. A: Standard confidence ellipses on the plane with color coding for diagnostic groups. B: The same projection as panel A, but with Voronoi tessellation (island count omitted as an option in the R library). The tessellation reveals clear spatial separation between COVID-19 patients and healthy controls, however, with overlap between groups. C: Combined visualization of both approaches. D: Dot plot overlaid with a 2D density contour plot analogous to the MetaboAnalyst 6.0 [9] default.
Class structure detection and agreement analysis
Voronoi tessellation also proved useful for visualizing class or cluster structures and highlighting clustering failures. For example, the “Lsun” dataset, constructed with two rectangular clusters, typically defies correct clustering by the k-means algorithm, as previously shown [14,17]. The Voronoi tessellation plot improves visibility of the original class structure (Fig 6A). As expected, k-means clustering failed to capture this structure, instead producing clusters that corresponded better to its inherent assumption of circular shapes in this two-dimensional dataset. By switching the coloring of data points and Voronoi cells between true classes and clusters using different combinations of the function parameters (“class_column”, “alternative_class_column”, “color_points”, “fill_voronoi”; see Textbox 1), the incorrect clustering became clearly visible (Fig 6B and C). For comparison, single linkage hierarchical clustering was applied, which can handle this dataset and produced a successful clustering solution (Fig 6D and E). The difference between the failed and satisfactory clustering became evident in the Voronoi tessellation plots.
A: Original class structure, with points and cells colored according to prior classes. B: Comparative visualization in which the points are colored according to the original classes and the Voronoi cells are colored according to the k-means cluster assignments, showing the agreement and disagreement between the prior classification and the unsupervised clustering. C: k-means clustering results, with both points and Voronoi cells colored according to cluster assignments. D and E: As B and C, but with the hierarchical single linkage clustering.
Discussion
The strength of Voronoi tessellation, whether applied to data projection planes or raw 2D coordinates, lies in its ability to highlight disruptions in expected patterns. This qualifies it as the method of choice in crystallography [7,8], and as the current demonstrations indicate, it appears to qualify for omics research as well. The tessellation of the projection plane makes it easier to identify data points that deviate from their fellow class members with respect to the main projection direction. The visualization effectively emphasizes what might be termed “internal outliers”. Conversely, conventional (“external”) outliers may be less visually prominent in this framework, though they can still be spotted easily, although the definition of outliers can vary [31]. However, combining Voronoi tessellations with confidence ellipses may be a complementary visualization strategy offering statistical and geometric perspectives on data clustering. Confidence ellipses reveal distributional characteristics. Voronoi diagrams, on the other hand, provide an intuitive representation of decision boundaries based on nearest-neighbor proximity. This dual approach leverages the strengths of both methods to offer a more comprehensive view of group structure and enhanced outlier detection capabilities.
Voronoi diagrams divide space into regions based on proximity to a set of points, which gives a clear visual partition of influence or dominance regions, which is ideal for spatial or clustered data, such as ecological zones, cellular territories, or geographical mapping [32]. Voronoi cells inherently define local neighborhoods based on distance, unlike PCA or PLS-DA plots, which may distort neighborhood relationships due to projection into lower-dimensional space, this is especially helpful in data where local context matters, like tissue analysis in histology or population distribution. [33,34]. Despite that, PCA and PLS-DA compress high-dimensional data into 2 or 3 dimensions, which can lead to loss of important variance or discriminative features. Voronoi tessellation can work directly with 2D spatial data without such compression, preserving more truthful geometrical relationships [35–37].
Incorporating Voronoi tessellation is an efficient approach to visualizing class boundaries in projected data spaces. However, it is not limited to projected data, as demonstrated by the “Lsun” data set example where clustering was done on the non-projected data. Unlike traditional clustering visualizations, which rely solely on point distributions, Voronoi regions provide explicit territorial boundaries for each observation. This creates an intuitive classification map of the feature space, which facilitates identifying potential misclassification zones, interpreting the local neighborhood structure around individual data points, and detecting regions of class overlap that may not be apparent in conventional scatter plots. That is, the visualization provides a diagnostic signal that points to data set instances that deviate in their projection from the expectations based on group membership. Whether these deviations are due to laboratory or data errors, represent a novel finding, or merely express normal data variation, is then subject to interpretation by the research team. The visualization merely helps identify cases for investigation.
Voronoi tessellations are especially useful in semi-supervised settings where they enable comparisons between data projections and prior classifications. This includes assessing whether the projected data supports existing classifications. Discrepancies between clustering results and the underlying structure can be easily identified through visual inspection. For instance, as illustrated in the “Lsun” example (Fig 6C), a solitary grey cluster on the right appears as two dense regions upon examination using Voronoi tessellation. This highlights shortcomings in the actual clustering approach. For numerical evaluation of cluster quality, standard metrics can be calculated independently from the present visualization technique, such as cluster accuracy, the (adjusted) Rand index [38], or others. This remains independent of the current visualization and beyond its scope, while in the present context a visualization-intrinsic quantitative measure is provided with the Voronoi island count.
Interpretation of Voronoi-discordant cases
When a data point’s Voronoi cell is colored differently from the point itself, indicating that the point projects into a region dominated by a different class, the researcher faces an interpretive decision. Three scenarios should be considered.
First, technical or data-quality issues should be excluded. Batch effects, sample labeling errors, preprocessing failures, or instrument drift can all cause individual samples to project anomalously. A discordant case that co-occurs with a known batch boundary or a sample flagged during quality control should be investigated via data provenance review before any biological interpretation is attempted. The “PsA_lipidomics” dataset (Fig 4) illustrates this scenario: the discordant control samples corresponded to samples processed in a separate batch with insufficient normalization. Second, if technical explanations are ruled out, the case may represent a genuinely atypical biological instance: a novel phenotype, a subpopulation not anticipated by the original study design, a mixed diagnosis, or a case in transition between states. Such cases merit targeted follow-up analysis, such as re-examination of raw measurements, additional clinical variables, or independent replication. The pain dataset (Fig 3) provides examples where discordant cases may reflect genuine biological variability in pain sensitivity that cuts across the sex-based classification. Third, in datasets where groups naturally overlap or the class boundary is diffuse, a degree of Voronoi discordance is expected and does not indicate an error or a novel finding. When group separation is weak or the projection collapses a continuous gradient into a discrete classification, some cells near the boundary will inevitably project into foreign-class territory. In such cases, the overall pattern of discordance, i.e., its spatial distribution and prevalence, as quantified by the island rate, is more informative than any individual discordant case.
Voronoi islands, in which all neighboring cells belong to a different class, constitute the most extreme form of discordance and should receive the highest investigative priority, as they are least likely to arise from boundary overlap alone. Not every label-discordant case forms an isolated island: a switched case located near a group boundary may still share a Voronoi edge with a same-class instance, and two points projected among opposite classes but positioned closely together will each share at least one edge with a member of their own class, as illustrated in the right gray region of Fig 1D. This is not a limitation of the visualization. The tessellation correctly differentiates between fully enclosed discordant cases, which represent the strongest signal, and boundary-adjacent discordant cases, which are visible in the plot but represent a weaker form of discordance. The Voronoi island count provides a scalar summary of the strongest class-discordance signal across the entire dataset. Importantly, visualization serves as a tool for judging results and generating hypotheses, not as a classifier itself. Identifying discordant cases marks the beginning of an interpretive process, with appropriate follow-up depending on the biological question, data quality, and possibly projection strength. The Voronoi islands enhance the concept of “looking at the errors,” i.e., data instances that are apparently located in the “wrong place.” Whether or not these instances are actually errors must be determined subsequently, once the attention has been drawn to them.
Strengths and limitations
In the actual implementation, support for dual classification systems (primary and alternative; see Textbox 1) addresses a common challenge in multivariate analysis, where data points may belong to multiple taxonomic or functional categories simultaneously. This flexibility enables researchers to explore different classification schemes within the same projected space and compare how different grouping strategies affect visual separation patterns.
Case labeling, enabled via the “show_labels” parameter, serves different purposes depending on the context of use. In exploratory or interactive analysis, enabling labels for all cases allows rapid identification of specific data points for follow-up. In publication figures, however, labeling all cases in high-density datasets can produce cluttered displays. For such contexts, we recommend a selective labeling strategy: the “case_labels “argument accepts a vector in which uninformative positions are set to empty strings, suppressing those labels while retaining “ggrepel”-based collision avoidance for the labeled subset (see https://cran.r-project.org/package=ggrepel). The suitability of case labeling depends on the dataset size and the width and height of the exported figure. Therefore, the R implementation provides the “show_labels” parameter to toggle case labeling as needed, and the “show_island_count” subtitle provides a quantitative summary that reduces the need for exhaustive individual labeling, or can be combined with the parameter “label_islands_only = TRUE” which reduces the labeling to cases identified as Voronoi islands (for example, see Fig 4).
A characteristic of the Voronoi island metric is that it depends on local neighbor topology, not global visual impression. If two or more points from the same class are located within a region dominated by the opposite class but happen to be adjacent to each other (sharing a Voronoi edge), they will not be counted as islands because they each have at least one same-class neighbor. This is correct as intended, but this behavior emphasizes that the island count is a geometric measure of cell-level isolation, not a general measure of spatial segregation. Consequently, the island count should be interpreted in conjunction with visual inspection of the tessellation plot itself, rather than as a standalone summary statistic. The metric quantifies a specific geometric pattern, i.e., complete local isolation, but does not capture all forms of class structure disruption visible in the tessellation. In principle, the concept could be extended to define more general neighborhood-based metrics that also account for small same-class clusters embedded within regions of another class; however, the development and systematic evaluation of such extensions lie beyond the scope of the present work, which focuses on introducing a data visualization alternative to confidence ellipses.
While this visualization approach provides insights into the class structure of a data set, the effectiveness of the method depends on the quality of the initial dimensionality reduction. Poor projection techniques may obscure rather than reveal class relationships [39]. Therefore, choosing the right projection techniques remains a key component of the data analysis workflow. Although each data set is unique, one can rely on available comparative benchmarking results [4,17], although a priori definition of the best projection method, including “none”, is difficult. The appearance of the tessellation (dispersed, interleaved cells versus compact, segregated regions) is itself informative about projection quality and the degree of class separation supported by the data. The increase in island rate from 2.8% under PLS-DA to 5.6% under UMAP for the same dataset further illustrates this: the metric is sensitive not only to the presence of atypical cases but also to the overall quality of the projection. Additionally, the Voronoi tessellation approach assumes that proximity in the reduced space corresponds to similarity in the original, high-dimensional space, which is not always the case.
Conclusions
This study introduces a visualization framework integrating Voronoi tessellation and optional confidence ellipses to improve the evaluation of data projections and clustering results. Across artificial and biomedical datasets, the method demonstrated superior sensitivity in detecting structural inconsistencies between projected data and known classifications. It outperformed conventional scatter plots with confidence ellipses alone. Notably, the method enabled clearer identification of cases in which the clustering results did not align with the underlying group structures. These findings establish Voronoi tessellation as a robust alternative to standard confidence ellipse visualizations in omics analysis software and highlight the added value of a combined visualization strategy. Overall, the Voronoi‑tessellation-based visualizations of data point projections in the context of class membership provide a practical and effective tool for more reliable interpretation of dimensionality reduction and clustering in various data analysis applications.
Textbox 1: R function calls for the 2D data visualization with Voronoi-tessellation. For parameter definitions, see Table 1 and at the report’s public code repository (see Data availability statement).
1. results <-
2. create_tesselation_plots(
3. data,
4. class_column = NULL,
5. alternative_class_column = NULL,
6. coordinate_columns = NULL,
7. case_labels = NULL,
8. coord_names = c("Dim1", "Dim2"),
9. title = NULL,
10. show_labels = FALSE,
11. ellipse_alpha = 0.1,
12. voronoi_alpha = 0.3,
13. point_size = 2,
14. legend_position = "bottom",
15. color_palette = NULL,
16. add_grid_lines = FALSE,
17. color_points = "primary",
18. fill_voronoi = "primary",,
19. point_shape = "none",
20. label_fontface = "plain",
21. label_size = 3.88,
22. show_island_count = FALSE,
23. label_islands_only = FALSE
24. )
References
- 1. Hotelling H. Analysis of a complex of statistical variables into principal components. Journal of Educational Psychology. 1933;24(7):498–520.
- 2. Pearson K. LIII. On lines and planes of closest fit to systems of points in space. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science. 1901;2(11):559–72.
- 3. Wold S, Ruhe A, Wold H, Dunn IWJ. The collinearity problem in linear regression. The partial least squares (PLS) approach to generalized inverses. SIAM J Sci and Stat Comput. 1984;5(3):735–43.
- 4. Lötsch J, Ultsch A. Comparative assessment of projection and clustering method combinations in the analysis of biomedical data. Informatics in Medicine Unlocked. 2024;50:101573.
- 5. Ihaka R, Gentleman R. R: A language for data analysis and graphics. Journal of Computational and Graphical Statistics. 1996;5(3):299–314.
- 6.
Van Rossum G, Drake FL. Python tutorial. Amsterdam: Centrum voor Wiskunde en Informatica. 1995.
- 7. Zheng X, Sun T, Zhou J, Zhang R, Ming P. Modeling of polycrystalline material microstructure with 3D grain boundary based on laguerre-voronoi tessellation. Materials (Basel). 2022;15(6):1996. pmid:35329448
- 8. Leitold C, Dellago C. Nucleation and structural growth of cluster crystals. J Chem Phys. 2016;145(7):074504. pmid:27544116
- 9. Pang Z, Lu Y, Zhou G, Hui F, Xu L, Viau C, et al. MetaboAnalyst 6.0: Towards a unified platform for metabolomics data processing, analysis and interpretation. Nucleic Acids Res. 2024;52(W1):W398–406. pmid:38587201
- 10. Alexandersson A. Graphing confidence ellipses: An update of ellip for Stata 8. Stata Journal. 2004;4(3):242–56.
- 11. Voronoi G. Nouvelles applications des paramètres continus à la théorie des formes quadratiques. Premier mémoire. Sur quelques propriétés des formes quadratiques positives parfaites. Journal für die reine und angewandte Mathematik (Crelles Journal). 1908;1908(133):97–102.
- 12. Delaunay B. Sur la sphère vide. Izv Akad Nauk SSSR: Otdel Mat Estestv Nauk. 1934;:793–800.
- 13. Kruskal WH, Wallis WA. Use of ranks in one-criterion variance analysis. J Am Stat Assoc. 1952;47(260):583–621.
- 14. Ultsch A, Lötsch J. The fundamental clustering and projection suite (FCPS): A dataset collection to test the performance of clustering and data projection algorithms. Data. 2020;5(1):13.
- 15. MacQueen J. Some methods for classification and analysis of multivariate observations. Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, 1967.
- 16. Steinhaus H. Sur la division des corps matériels en parties. Bull Acad Polon Sci. 1956;1(804):801.
- 17. Ultsch A, Lötsch J. Machine-learned cluster identification in high-dimensional data. J Biomed Inform. 2017;66:95–104. pmid:28040499
- 18.
Lötsch J, Lieb I, Dimova V. Quantitative sensory testing and classical pain model dataset in 127 healthy volunteers. Mendeley Data. 2026. https://doi.org/10.17632/9v8ndhctvz.2
- 19. Lötsch J, Dimova V, Ultsch A, Lieb I, Zimmermann M, Geisslinger G, et al. A small yet comprehensive subset of human experimental pain models emerging from correlation analysis with a clinical quantitative sensory testing protocol in healthy subjects. Eur J Pain. 2016;20(5):777–89. pmid:26492152
- 20. Rolke R, Magerl W, Campbell KA, Schalber C, Caspari S, Birklein F, et al. Quantitative sensory testing: A comprehensive protocol for clinical trials. Eur J Pain. 2006;10(1):77–88. pmid:16291301
- 21. Bartley EJ, Fillingim RB. Sex differences in pain: a brief review of clinical and experimental findings. Br J Anaesth. 2013;111(1):52–8. pmid:23794645
- 22. Mogil JS. Sex differences in pain and pain inhibition: multiple explanations of a controversial phenomenon. Nat Rev Neurosci. 2012;13(12):859–66. pmid:23165262
- 23.
Lötsch J, Gurke R, Hahnefeld L, Behrens F, Geisslinger G. Psoriatic arthritis (PsA) clinical lipidomics dataset with hidden laboratory workflow artifacts. 2026. https://doi.org/10.17632/32xts2zxdc.3
- 24. Lötsch J, Gurke R, Hahnefeld L, Behrens F, Geisslinger G. Psoriatic Arthritis (PsA) clinical lipidomics dataset with hidden laboratory workflow artifacts: A benchmark dataset for data processing quality control in lipidomics. Data. 2026;11(2):32.
- 25.
Turner R. Deldir: Delaunay triangulation and Dirichlet (Voronoi) tessellation. 2024.
- 26.
Wickham H. ggplot2: Elegant Graphics for Data Analysis: Springer-Verlag New York; 2009.
- 27.
Arnold JB. ggthemes: Extra themes, scales and geoms for ‘ggplot2’. 2019.
- 28. McInnes L, Healy J. UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction. ArXiv. 2018.
- 29. Rohart F, Gautier B, Singh A, Lê Cao K-A. mixOmics: An R package for ’omics feature selection and multiple data integration. PLoS Comput Biol. 2017;13(11):e1005752. pmid:29099853
- 30.
Konopka T. umap: Uniform Manifold Approximation and Projection. 2023.
- 31. Hansen J, Ahern S, Earnest A. Evaluations of statistical methods for outlier detection when benchmarking in clinical registries: a systematic review. BMJ Open. 2023;13(7):e069130. pmid:37451708
- 32. Smith E, Trefftz C, DeVries B. A Divide-and-Conquer Algorithm for Computing Voronoi Diagrams. IEEE Int Conf Electro Inf Technol. 2020;2020:10.1109/eit48999.2020.9208270. pmid:33510934
- 33. Li L. Dimension reduction for high-dimensional data. Methods Mol Biol. 2010;620:417–34. pmid:20652514
- 34. Levet F. Optimizing Voronoi-based quantifications for reaching interactive analysis of 3D localizations in the million range. Front Bioinform. 2023;3:1249291. pmid:37600969
- 35. Lê Cao K-A, Boitard S, Besse P. Sparse PLS discriminant analysis: Biologically relevant feature selection and graphical displays for multiclass problems. BMC Bioinformatics. 2011;12:253. pmid:21693065
- 36. Tang J, Wang Y, Luo Y, Fu J, Zhang Y, Li Y, et al. Computational advances of tumor marker selection and sample classification in cancer proteomics. Comput Struct Biotechnol J. 2020;18:2012–25. pmid:32802273
- 37. Duyckaerts C, Godefroy G. Voronoi tessellation to study the numerical density and the spatial distribution of neurones. J Chem Neuroanat. 2000;20(1):83–92. pmid:11074346
- 38. Rand WM. Objective criteria for the evaluation of clustering methods. Journal of the American Statistical Association. 1971;66(336):846–50.
- 39. Lötsch J, Ultsch A. Current projection methods-induced biases at subgroup detection for machine-learning based data-analysis of biomedical data. Int J Mol Sci. 2019;21(1):79. pmid:31861946