top of page

Introducing CACHAI: From Chord Diagrams to Chernoff Faces

Writer: Maria Luiza L. Dantas
Maria Luiza L. Dantas
14h
7 min read

A Growing Python Toolkit for Scientific Visualisation


Scientific research increasingly relies on large, multidimensional datasets. In astronomy, we routinely work with dozens of parameters describing stars, galaxies, and planetary systems, from chemical abundances and stellar ages to orbital properties and photometric measurements. Extracting meaningful patterns from these datasets is challenging, but communicating those patterns effectively can be just as difficult.This is where scientific visualisation becomes particularly important.


Today, we are pleased to announce the publication of the second module of CACHAI, our open-source Python package for scientific visualisation, led by Diego Beltrán, a former undergraduate student! With the introduction of Chernoff Faces, CACHAI now offers two complementary approaches to exploring and presenting multidimensional information.


Although the first module was released in 2025, we never formally introduced the package here. The publication of our second module therefore provides an excellent opportunity to present CACHAI, explain the motivation behind its development, and explore what both modules can offer the scientific community.



What is CACHAI?


CACHAI (Custom Axes and CHarts Advanced Interface) is an open-source Python package designed to create highly customisable scientific visualisations. Built around the Matplotlib ecosystem, CACHAI aims to make specialised visualisation techniques more accessible to researchers while preserving the flexibility required for publication-quality figures.


The project originated from a practical challenge: how can we represent complex relationships and multiple physical properties in ways that are simultaneously informative, intuitive, and visually engaging?


Traditional scatter plots, histograms, and correlation matrices remain indispensable scientific tools. However, they are not always the most effective way to communicate the structure of a complex dataset, particularly when several variables or relationships must be considered simultaneously.


CACHAI explores alternative approaches to these challenges.

Its first two modules are:

  • ChordDiagram: visualising relationships, correlations, and connections between multiple variables.

  • Michinoff: representing multidimensional observations through stylised cat faces, whose individual features encode different numerical properties.


Both modules are intended to complement conventional visualisation tools and techniques.


Module I: Chord Diagrams


The first CACHAI module was introduced in 2025 in our Research Note "CACHAI's First Module: A Fully Customizable Chord Diagram for Astronomy and Beyond."



Chord diagrams offer a compact way to represent relationships between several variables. Instead of displaying these relationships in a conventional correlation matrix, the variables are arranged around a circle and connected by links.


The resulting diagram provides an alternative perspective on the structure of a dataset, allowing researchers to identify groups of strongly related quantities, investigate connections between different parameters, and highlight relationships of particular scientific interest.


Our implementation provides extensive control over the appearance and structure of these diagrams, including correlation thresholds, individual element styling, targeted highlighting, adaptive node spacing, and logarithmic scaling of link thickness.

These features allow users to tailor their figures to the properties of their datasets and to the scientific questions they wish to address.


In our original publication, we demonstrated the module using astronomical data, including stellar parameters and kinematic quantities. However, the underlying approach is not restricted to astronomy. Chord diagrams can be useful wherever researchers need to examine relationships within complex multivariate datasets.



Figure 1. Example of a chord diagram generated with CACHAI, illustrating how relationships between multiple variables can be represented in a single visualisation. This figure was retrieved from CACHAI's first Research Notes.
Figure 1. Example of a chord diagram generated with CACHAI, illustrating how relationships between multiple variables can be represented in a single visualisation. This figure was retrieved from CACHAI's first Research Notes.


Module II: Chernoff Faces


Today, we introduce the second CACHAI module, described in our new publication in Research Notes of the American Astronomical Society.



This module implements Chernoff faces, a visualisation technique originally proposed by Herman Chernoff in 1973. The module is officially named Michinoff Faces, a playful nod to our Latin American roots. In Spanish-speaking Latin America, cats are affectionately called michis, so we combined michi with Chernoff to create Michinoff. The name is not merely a nickname: it is embedded in the package itself, reflecting our implementation of the classic Chernoff faces technique using expressive cat faces instead of human ones. This brings a little humour and a distinctly Latin American cultural touch to scientific data visualisation. After all, cats are beloved all around the world!


The idea is remarkably simple: instead of representing each observation as a point in a multidimensional parameter space, we represent it as a stylised human face.

Different numerical variables control different facial features, such as the shape of the face, the size of the eyes, the curvature of the mouth, or the dimensions of the nose.

Each face therefore becomes a visual representation of an individual observation.



Why might this be useful?


Humans are particularly adept at recognising and distinguishing faces. Chernoff's original proposal was to exploit this perceptual ability to help identify patterns in multidimensional data.


For example, consider a sample of stars characterised by effective temperature, metallicity, age, chemical abundances, and kinematic properties. Rather than examining each quantity separately, we can assign these variables to different facial features.


Stars with similar combinations of properties may then produce visually similar faces, while unusual objects may stand out through distinctive combinations of features.


This does not mean that facial similarity constitutes a statistically rigorous measure of similarity between observations. Indeed, the interpretation depends on how variables are normalised and mapped onto facial features. Nevertheless, Chernoff faces provide an alternative and potentially engaging way to explore the diversity of a dataset.


Our new module brings this visualisation technique into the CACHAI framework, extending the package beyond relationships between variables to the representation of individual multidimensional observations.



Figure 2. Example of Chernoff faces generated with CACHAI, showing how multiple numerical properties can be encoded through different facial features. This figure was retrieved from CACHAI's second Research Notes and represents the dataset-based mode for the Michinoff faces.
Figure 2. Example of Chernoff faces generated with CACHAI, showing how multiple numerical properties can be encoded through different facial features. This figure was retrieved from CACHAI's second Research Notes and represents the dataset-based mode for the Michinoff faces.


Figure 3. Example of Chernoff faces generated with CACHAI using the individual face mode. This figure was retrieved from the second paper in the T-GEX series (both papers are currently undergoing peer review; stay tuned for the next posts on T-GEX!).
Figure 3. Example of Chernoff faces generated with CACHAI using the individual face mode. This figure was retrieved from the second paper in the T-GEX series (both papers are currently undergoing peer review; stay tuned for the next posts on T-GEX!).


Two Modules, Two Complementary Perspectives


One of the most interesting aspects of CACHAI is that its two modules approach multidimensional information from different perspectives. Chord diagrams focus on relationships between variables. They help answer questions such as: Which quantities are strongly correlated? Which parameters are connected? Are there groups of variables exhibiting similar relationships?


Chernoff faces, on the other hand, focus on the properties of individual observations. They invite questions such as: Which objects exhibit similar combinations of characteristics? Are there unusual observations? Can we recognise visually distinctive groups within a sample?


These approaches are complementary.


For instance, in a stellar population study, a chord diagram could reveal correlations between chemical abundances, stellar parameters, and orbital properties. Chernoff faces could then provide an alternative representation of individual stars, allowing researchers to explore how their combined characteristics vary across the sample.

Importantly, neither method replaces quantitative statistical analysis. Their value lies in offering additional ways to explore, interpret, and communicate complex information.


Getting Started with CACHAI


CACHAI is freely available through the Python Package Index (PyPI) and can be installed using pip:

$ pip install cachai

The source code is hosted on GitHub, where users can explore the implementation, report issues, and follow future developments.

The package is intended to be accessible to researchers already familiar with Python-based scientific computing, particularly those working with Matplotlib. We encourage researchers interested in alternative visualisation techniques to experiment with the package using their own datasets.

Beyond Astronomy


Although CACHAI was developed in an astronomical research context, its potential applications extend well beyond astrophysics. Both chord diagrams and Chernoff faces are general-purpose visualisation techniques that can be applied to multidimensional datasets in fields such as biology, environmental science, economics, and the social sciences.


Our intention is to make these techniques available through a flexible Python interface, enabling researchers to adapt them to different scientific problems. Scientific visualisation is not merely a final step in presenting research results. It can also be part of the exploratory process, helping us formulate questions, identify unexpected behaviour, and develop new ways of interpreting complex datasets.


What Comes Next?


With the release of its second module, CACHAI continues to develop as a toolkit for scientific visualisation. We envisage the package as an evolving collection of specialised visualisation methods, with an emphasis on flexibility, reproducibility, and scientific communication.


Future developments will be guided by the needs of our research projects, as well as feedback from the broader scientific community.


We welcome suggestions, bug reports, and contributions through the GitHub repository.



Publications and How to Cite CACHAI


If you use CACHAI in your research, please consider citing the publication corresponding to the module you employ.


Module I: Chord Diagrams

CACHAI's First Module: A Fully Customizable Chord Diagram for Astronomy and Beyond.

Research Notes of the American Astronomical Society (2025).


@ARTICLE{2025RNAAS...9..216B,
    author = {{Beltr{\'a}n}, D. and {Dantas}, M.~L.~L.},
    title = "{CACHAI's First Module: A Fully Customizable Chord Diagram for Astronomy and Beyond}",
    journal = {Research Notes of the American Astronomical Society},
    keywords = {Interdisciplinary astronomy, Astronomy data analysis, Astronomy data visualization, Astronomy software, 804, 1858, 1968, 1855},
    year = 2025,
    month = aug,
    volume = {9},
    number = {8},
    eid = {216},
    pages = {216},
    doi = {10.3847/2515-5172/adf8df},
    adsurl = {https://ui.adsabs.harvard.edu/abs/2025RNAAS...9..216B},
    adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Module II: Chernoff Faces

Research Notes of the American Astronomical Society (2026).


@ARTICLE{2026RNAAS..10..331B,
    author = {{Beltr{\'a}n}, D. and {Dantas}, M.~L.~L.},
    title = "{CACHAI's Second Module: Chernoff Faces to Face Them All}",
    journal = {Research Notes of the American Astronomical Society},
    keywords = {Interdisciplinary astronomy, Astronomy data analysis, Astronomy data visualization, Astronomy software, Astronomy education},
    year = 2026,
    month = nov,
    volume = {10},
    number = {11},
    eid = {331},
    pages = {331},
    doi = {10.3847/2515-5172/aebec8},
    adsurl = {https://ui.adsabs.harvard.edu/abs/2026RNAAS..10..331B},
    adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

We hope CACHAI will prove useful to researchers seeking new ways to explore their data and communicate scientific results!

After all, sometimes looking at familiar data from a different perspective is precisely what allows us to discover something new!

Comments


Let's get in touch! Send me an e-mail at

mlldantas at protonmail dot com

© 2019-2026 by M. L. L. Dantas

Template by Wix.com

 

bottom of page