This is an openaccess article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR Formative Research, is properly cited. The complete bibliographic information, a link to the original publication on https://formative.jmir.org, as well as this copyright and license information must be included.
Traditional Chinese medicine (TCM) formulas are combinations of Chinese herbal medicines. Knowledge of classic medicine formulas is the basis of TCM diagnosis and treatment and is the core of TCM inheritance. The large number and flexibility of medicine formulas make memorization difficult, and understanding their composition rules is even more difficult. The multifaceted and multidimensional properties of herbal medicines are important for understanding the formula; however, these are usually separated from the formula information. Furthermore, these data are presented as text and cannot be analyzed jointly and interactively.
We aimed to devise a visualization method for TCM formulas that shows the composition of medicine formulas and the multidimensional properties of herbal medicines involved and supports the comparison of medicine formulas.
A TCM formula visualization method with multiple linked views is proposed and implemented as a webbased tool after close collaboration between visualization and TCM experts. The composition of medicine formulas is visualized in a formula view with a similaritybased layout supporting the comparison of compositing herbs; a shared herb view complements the formula view by showing all overlaps of pairwise formulas; and a dimensionalityreduction plot of herbs enables the visualization of multidimensional herb properties. The usefulness of the tool was evaluated through a usability study with TCM experts.
Our method was applied to 2 typical categories of medicine formulas, namely tonic formulas and heatclearing formulas, which contain 20 and 26 formulas composed of 58 and 73 herbal medicines, respectively. Each herbal medicine has a 23dimensional characterizing attribute. In the usability study, TCM experts explored the 2 data sets with our webbased tool and quickly gained insight into formulas and herbs of interest, as well as the overall features of the formula groups that are difficult to identify with the traditional textbased method. Moreover, feedback from the experts indicated the usefulness of the proposed method.
Our TCM formula visualization method is able to visualize and compare complex medicine formulas and the multidimensional attributes of herbal medicines using a webbased tool. TCM experts gained insights into 2 typical medicine formula categories using our method. Overall, the new method is a promising first step toward new TCM formula education and analysis methodologies.
Understanding and applying classical medicine formulas is the basis of traditional Chinese medicine (TCM) diagnosis and treatment and is the core of TCM inheritance. We use the term medicine formulas and herbal formulas interchangeably. Syndrome differentiation and treatment is a core method used in TCM. In clinical practice, prescriptions are based on classical medicine formulas, and the corresponding medicines may be adjusted according to the symptoms of patients. A typical prescription may contain several medicine formulas, but it is a challenge to identify the involved formulas and understand their effects.
Learning and teaching formulas for Chinese medicine is difficult. Traditional education methods involve reciting classical medicine formulas based on their composition rules [
In this study, we propose a visualization method for TCM formulas to assist in the learning of the subject. Our method provides an overview of a set of formulas and their compositing medicines and an interactive exploration of the association between formulas and herbs. The usefulness of our method was demonstrated using 2 use cases of typical medicine formula groups in a usability study.
The target audience of our method was medical students learning TCM formulas. However, TCM doctors and patients could also benefit from our method to better understand the formulas or prescriptions.
In this paper, Pinyin—the standard romanization system of Chinese—is used for the names of formulas and medicines, and the corresponding Chinese characters are provided in parentheses. A conversion table for Pinyin, Chinese characters, English, and Latin is provided in
Part of the original text–based medicine formula information summarized from the textbook Chinese Herbal Formulas (Tenth Edition) [
Formula  Medicines 
Renshen (Ginseng, 人参)^{b.c} Shudihuang (Prepared Rehmannia Root, 熟地黄)^{c} Danggui (root of Chinese Angelica, 当归) Chuanxiong (Chuanxiong Rhizoma, 川芎) Baizhu (rhizome of Largehead Atractylodes, 白术) Fuling (Indian Bread, 茯苓) Baishao (White peony root, 白芍) Zhigancao (liquorice root, 炙甘草) Shengjiang (Fresh Ginger, 生姜) Dazao (Jujube Chinese date, 大枣) 

Renshen (Ginseng, 人参)^{c} Baizhu (rhizome of Largehead Atractylodes, 白术)^{c} Fuling (Indian Bread, 茯苓)^{c} Lianzi (Lotus Seed, 莲子) Yiyiren (seed of Jobstears, 薏苡仁) Shanyao (Common Yam Rhizome, 山药) Jiegeng (Platycodon Root, 桔梗) Dazao (Jujube Chinese date, 大枣) Gancao (root of Ural Licorice, 甘草) Sharen (Villous Amomum Fruit, 砂仁) Baibiandou (White Hyacinth Bean, 白扁豆) 

Renshen (Ginseng, 人参)^{c} Maidong (Dwarf lilyturf tuber, 麦冬) Wuweizi (Schisandrae Chinensis Fructus, 五味子) 

Renshen (Ginseng, 人参)^{c} Gancao (root of Ural Licorice, 甘草) Baizhu (rhizome of Largehead Atractylodes, 白术) Fuling (Indian Bread, 茯苓) 

Shudihuang (Prepared Rehmannia Root, 熟地黄)^{c} Guijia (Tortose's Carapae and Plastron, 龟甲)^{c} Huangbo (Phellodendron bark, 黄柏) Zhimu (rhizome of Common Amarrhe, 知母) 

Shudihuang (Prepared Rehmannia Root, 熟地黄)^{c} Baishao (White peony root, 白芍) Chuanxiong (Chuanxiong Rhizoma, 川芎) Danggui (root of Chinese Angelica, 当归) 

Shudihuang (Prepared Rehmannia Root, 熟地黄)^{c} Shanzhuyu (Asiatic Cornelian Cherry Fruit, 山茱萸)^{c} Roucongrong (Desertliving Cistanche, 肉苁蓉)^{c} Bajitian (Morindae Officilis Radix, 巴戟天)^{c} Maidong (Dwarf lilyturf tuber, 麦冬) Yuanzhi (Thinleaf Milkwort Root, 远志) Shengjiang (Fresh Ginger, 生姜) Fuzi (Common Monkshood Daughter Root, 附子) Fuling (Indian Bread, 茯苓) Dazao (Jujube Chinese date, 大枣) Wuweizi (Schisandrae Chinensis Fructus, 五味子) Shihu (Noble Dendrobium Stem Herb, 石斛) Shichangpu (Grassleaf Sweetflag Rhizome, 石菖蒲) Rougui (Cassia Bark, 肉桂) Bohe (Mentha, Peppermint, 薄荷) 
^{a}The italicization represents the Pinyin name of formulas.
^{b}Pinyin (English name, Chinese name).
^{c}Principal herb or herbs.
Classifications of Chinese herbal medicines are multifaceted and multileveled [
Another important concept for herbs in the formula is JunChenZuoShi (君臣佐使). JunChenZuoShi is the principle of the compatibility of TCM formulas. Junyao (君药), namely, principal herbs as used hereafter, plays a major role against the main disease or syndrome. It is the primary herb used in the formulas. Footnote c in
In this work, the medicine formulas data were extracted from the key medicine formulas of the textbook
This study did not involve human subjects research. The data used in this study were obtained from a publicly available database and a textbook.
Our goal was to devise a joint visualization method of medicine formulas and the attributes of corresponding herbs. The visual design should support the comparison of formulas and facilitate the classification of herbs based on their properties (Siqi, Wuwei, and Guijing). Visualization and TCM experts worked closely together to analyze the requirements of the visual analysis method for medicine formulas. The requirements are summarized as follows:
Requirement 1: clear visualization of medicine formulas
Requirement 2: comparing different medicine formulas with ease
Requirement 3: principal herbs should be highlighted
Requirement 4: associating medicine formulas and attributes of the corresponding herbs
Requirement 5: visual elements should be effectively perceived
Requirement 6: interactions should be easy
Requirement 7: visual designs should reflect general concepts of TCM
Our method is the result of an iterative development process using quick prototypes. Prototypes were realized based on the requirements and proposed to the TCM expert (SP, one of the authors), and improvements were made based on the feedback of the TCM expert.
The workflow of our method is shown in
The workflow of our method.
The attributes of an herbal medicine can be written as an Mdimensional (M=23) vector
The Mdimensional space is then dimensionality reduced to 2D with a vector
Uniform manifold approximation and projection for dimension reduction (UMAP) [
The distance between
Typically, a dozen formulas and even more herbs are included in a category of formulas. From a set visualization perspective, both the number of sets and set elements are large; therefore, a suitable visualization that scales well and is easily understandable is required.
We evaluated popular set visualization techniques to design a proper set visualization method using a TCM expert (SP). The figures of an Euler diagram, a nodelink diagram, and matrixbased methods included in a set visualization survey paper [
On the basis for this informal evaluation, we decided to devise a sparse matrixbased method based on the evaluation to show formulas and corresponding medicines to meet requirements 1 and 2. To support the analysis of overlapping herbs within formulas, a cooccurrence matrix view is used to complement the formula view.
Our formulamedicine matrix (setelement matrix) treats formulas (sets) as columns and herbs (elements) as rows. The matrix can be shown with a sparse representation as a collection of formula columns of their corresponding herb rows. This representation is similar to that of an icicle plot for hierarchical visualization. It has the potential to support the comparison of similar medicine formulas if properly laid out. Furthermore, the icicle plot allows for the encoding of herbs in a hierarchy to separate the principal herbs from other herbs.
Each record in the medicine formula data contains the name of the formula, names of herbs, and tags for principal medicines (
The design of the icicle plot of medicine formulas. Each column of the icicle plot contains a medicine formula, which comprises principal herbs (text in blue) and other herbs (text in black). The name of the formula is placed under its column.
Icicle plots with (A) the original order of medicine formulas data and (B) our similaritybased layout. (This figure is compressed, and a highresolution version can be found in
In our design, principal herbs were highlighted and treated differently from other herbs to meet requirement 3. As shown in
Because the setbased formula information must be converted into columns of the icicle plot, ordering is needed for herbs in a formula. However, herbs in the original data have no specific ordering: the resulting icicle plot of medicine formulas of tonic formulas with the initial ordering of herbs is shown in
Our method is an efficient greedy algorithm with 2 steps based on the similarity of herbs: first, the arrangement of principal herbs and then the arrangement of the remaining herbs.
To facilitate this explanation, we introduced the similarity sequence
where
In this step, the columns of the icicle plot were sorted based on the similarity of the principal herbs. If an herb is the only principal herb in a certain medicine formula, it is assigned as the toplevel principal herb. Such herbs of all formulas were sorted using equation 4.
We then treat formulas with ≥1 principal herb. If any principal herb of the formula appears in the toplevel principal herb list, it is denoted as the toplevel principal herb of that formula; if none of the principal herbs in a formula is contained in the list, a random herb is selected and added to the list. An example is Wandaitang (完带汤) as highlighted in the yellow box in
The results after the arrangement of the principal herbs are shown in
Next, the remaining herbs were arranged. From left to right, each formula column was converted from a set to a sequence. The leftmost column is sorted by distancebased ordering using equation 4. Starting from the second column from the left, medicines are sorted by local similarity—the same herbs in adjacent columns are aligned first, and other herbs are sorted based on distances to the adjacent herbs to the left.
A cooccurrence matrix view of formulas is included to complement the icicle plot for comparing formulas that are far apart, for example, having different principal herbs. The benefit of using a matrix view is that all formulas’ complete pairwise intersection information can be effectively represented and easily identified.
As shown in
The shared herbs matrix view of formulas.
The herb and formula views are color encoded based on the multidimensional attributes of herbs with perceptual guidance of their similarity. The workflow of our colorencoding method is illustrated in
The pipeline of our colorencoding method. CIECAM02UCS: International Commission on Illumination Color Appearance Model 2002 Uniform Color Space; RBF: radial basis function; sRGB: standard RGB; TCM: traditional Chinese medicine.
The colors of the representative herb were carefully chosen to show TCM concepts. These TCM concepts include 5 elements (五行), 5 colors (五色), and 5 internal organs (五脏), as summarized in
Colors designed for medicine based on traditional Chinese medicine concepts.
For perceptual uniformity, we used the International Commission on Illumination Color Appearance Model 2002 Uniform Color Space (CIECAM02UCS) [
RBF interpolation enables the interpolation of unstructured data, for example, a few scattered points or point clouds, making them a good choice for our method. We experimented with several RBFs, including Gaussian, cubic, and thinplate functions and chose the linear RBF. The choice is made for 2 reasons: first, the measure of Euclidean distance matches the distance of herbs, and second, the least duplicate colors are generated among the RBFs we tested.
Continuous 2D color maps of the 2 groups of medicine formulas generated by RBF interpolation over the entire 2D domain are shown in
To assign colors to the herbs, the 2D location of each herb in the dimensionalityreduced space was used for the interpolation of colors. Herb colors overlaid on the continuous color map are shown for the 2 formula groups in
Color encoding with our method for tonic formulas (the left column) and heatclearing formulas (the right column). Continuous 2D colormaps are shown in parts (A) and (B), respectively. (C) and (D) Herb colors are calculated based on their positions in the 2D domain. (This figure is compressed, and a highresolution version can be found in
Our visualization method supports interactive exploration within the formula view, the matrix view, and the herb view. Brushing and linking enables connections between these 3 views (requirement 4). In the formula view, the names of all formulas are shown whenever the mouse hovers over an herb, as shown in
Brushing and linking enables visual connections between the formula view and the herb view interactively. All herbs are highlighted in the herb view with enlarged size (
User interactions in our method: (A) mouse hovering in the formula view and (B) corresponding updates in the herb view; (C) lasso selection in the herb view and (D) corresponding changes in the formula view. (This figure is compressed, and a highresolution version can be found in
Visualizations of 2 typical groups of medicine formulas with our method: (A) tonic formulas and (B) heatclearing formulas. (This figure is compressed, and a highresolution version can be found in
The proposed method was implemented as a webbased visual analysis tool, as shown in
The evaluation of our method was performed as a usability study with the analysis of 2 representative use cases—tonic and heatclearing formulas—by 2 TCM experts (SP and XH). They were asked to analyze the formulas using the webbased tool with thinkaloud protocol analysis and provide feedback after the session. Both experts were systematically trained in TCM and obtained clinical degrees and certificates in TCM. One has obtained a doctoral degree in TCM (SP), whereas the other has been working in clinical for over 9 years (XH). Both experts have ≥14 years of expertise in TCM.
After introducing our method to the participants, they were asked to explore the medicine formulas data using our visualization tool, whereas the observer observed and talked to the participants. Afterward, they were asked to provide further feedback on the method. Visualizations of the 2 use cases presented to the TCM experts, as in the webbased tool, are shown in
The tonic formulas (
The heatclearing formulas (
Expert PS started the analysis by looking at the overall distribution of herbs and used her knowledge to assign representative herbs for each herb category listed in
In the icicle plot of tonic formulas (
The analysis of tonic prescriptions with our method. A lasso selects 4 herbs of interest in the herb view (left), and corresponding formulas are highlighted in the formula view (right). (This figure is compressed, and a highresolution version can be found in
In the matrix view (
It is known that the main role of Sijunzitang or Bazhentang is “invigorating Qi and blood.” The understanding of Qi and blood in TCM is the basic substance of the human body, which can reflect the importance of all supplements to Qi and blood in the matrix view. Yin and Yang are 2 interdependent, opposite, complementary, and exchangeable aspects of nature. Qi is Yang (阳, positive), blood is Yin (阴, negative), and Qi and blood are dependent. TCM physicians usually prescribe for diseases in which Qi and blood deviate from balance. The expert considered that this visualization is suitable for beginners to pay attention to the “Qi and blood” supplement for tonic formulas.
The analysis of heatclearing formulas is shown in
Interactive analysis of heatclearing formulas with our method. (This figure is compressed, and a highresolution version can be found in
Overall, both experts believe that our method can clearly disassemble complex formulas and assist in the memorization of their functionalities. The interactive visual analysis process is new to them and is helpful in enhancing their understanding of formula composition theories by making and testing their own hypotheses. They believe that the color encoding of herbs allows TCM students and beginners to understand the effect of herbs more intuitively and facilitate memorization. Beginners have difficulty understanding the similarities and differences between multiple similar formulas. With the lasso tool, beginners can test multiple herb combinations to better understand the similarities and differences between formulas and, therefore, better understand an actual prescription. In addition, they consider brushing and linking to be a beginnerfriendly way to understand the relationships between herbs and formulas. Both experts made positive comments on the coloring of herbs. For example, Danggui (root of Chinese Angelica, 当归) is a blood tonic herb and corresponds to red. On the other hand, Shigao (Gypsum, 石膏) works on the lungs and is colored white.
The experts suggest that in addition to assisting the learning of TCM formulas for beginners, the method can be extended to facilitate the learning of actual treatment plans for TCM physicians. The TCM theory system includes the process of “theory, method, formula, and herb,” and a treatment plan with prescriptions is performed to assess the effectiveness of formulas. The experts suggest supporting multiple lassos as future work to facilitate the buildingup of a prescription by adding herbs from an initial known set of herbs to learn actual treatment plans.
Our new visualization method could effectively reveal the compositional principle of medicine formulas and assist in the learning of TCM formula composition theories. The proposed method can effectively visualize complex TCM formulas and multidimensional herb attribute information. The joint analysis of medicine formulas and corresponding herbs is possible with user interactions and brushing and linking between multiple views within our webbased tool.
Few specialized visualization methods are available for Chinese medicine formulas analysis. A webbased tool allows for the visualization of formulas, herbal medicines, and photos of herbs [
Cold and hot properties were visualized as indicators of herbal medicine formulas in a formula analysis platform [
Querybased computer tools without visualization are readily available to assist the learning of herbal medicine formulas. A webbased application allows the searching, browsing, and narration of classic herbal medicine formulas [
Visualization methods are also used in other research areas of TCM, especially for the diagnosis of phenotypes. For TCM pulse information, visual recognition and visualization have been proposed, and the pulse information is quantified and visualized to support a more accurate diagnosis [
Set is an important research subject in visualization. Set visualization techniques were reviewed in a survey by Alsallakh et al [
The icicle plot [
Multidimensional data can be effectively visualized using dimensionalityreduction techniques [
Color perception is important for visualization. A survey of the use of colors in visualization can be found elsewhere [
Our method does not directly support the visualization of overlaps of ≥2 medicine formulas, that is, intersections of ≥2 sets. However, such information can be implicitly gained by visual searching in the medicine formula view and by interactively selecting herbs of interest that would highlight all formulas containing shared herbs.
Another limitation is that the dimensional reduction view does not explicitly show multidimensional properties but rather the relative distances between herbs. This could be addressed using additional multidimensional visualization techniques, such as parallel coordinates.
In the future, we would like to further enhance the comparison capability of our method. For example, we could support comparing multiple formulas that are not adjacent and apply set visualization techniques to show the correspondence of medicines and formulas directly in the herb view.
Moreover, we would like to apply their method to analyze more groups of formulas and TCM prescriptions in a clinical setting to assist TCM students and doctors to enhance their understanding of formula composition theories and improve their practice.
We introduced a visualization method for TCM formulas. The requirements and design choices of our method are made through a close collaboration between visualization and TCM experts in an iterative, quickprototyping fashion. Our method supports interactive visualization of medicine formulas with a similaritybased layout complemented by a matrix view of shared herbs by formulas, and multidimensional attribute data of herbs are visualized using a dimensionalityreduction method. The colors of visual elements are assigned with a perceptualguided, datadriven colorencoding method that achieves perceptual uniformity and reflects TCM concepts. The webbased tool that implements our method supports the interactive analysis and comparison of medicine formulas and corresponding herbs with brushing and linking between different views. The usability study of our method with TCM experts demonstrated the effectiveness of our method for joint TCM formula composition and herb property analysis. Further feedback from experts suggests that our method has potential for educating TCM formula composition theories and modernizing TCM inheritance methods.
The supplementary material of technical details and herb names conversion table for Chinese, Pinyin, English, and Latin.
High resolution figures.
Highresolution version of fig 9.
Highresolution of fig 10.
Highresolution version of fig 11.
International Commission on Illumination Color Appearance Model 2002 Uniform Color Space
International Commission on Illumination Lab color space
radial basis function
standard RGB
traditional Chinese medicine
Tdistributed Stochastic Neighbor Embedding
uniform manifold approximation and projection for dimension reduction
The authors thank Xiaoxuan Hu for participating in the usability study and for providing valuable insights and suggestions for improvement. This research was supported by the State Key Laboratory of Dampness Syndrome of Chinese Medicine Fund (SZ2021KF10).
None declared.