{'fraction_non_alphanumeric': 0.03345835961098018, 'fraction_numerical': 0.006920702360009294, 'mean_word_length': 4.7544647120618855, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
MetaGlyph: Automatic Generation of Metaphoric Glyph-based Visualization

Glyph-based visualization achieves an impressive graphic design when associated with comprehensive visual metaphors, which help audiences effectively grasp the conveyed information through revealing data semantics. However, creating such metaphoric glyph-based visualization (MGV) is not an easy task, as it requires not only a deep understanding of data but also professional design skills. This paper proposes MetaGlyph, an automatic system for generating MGVs from a spreadsheet. To develop MetaGlyph, we first conduct a qualitative analysis to understand the design of current MGVs from the perspectives of metaphor embodiment and glyph design. Based on the results, we introduce a novel framework for generating MGVs by metaphoric image selection and an MGV construction. Specifically, MetaGlyph automatically selects metaphors with corresponding images from online resources based on the input data semantics. We then integrate a Monte Carlo tree search algorithm that explores the design of an MGV by associating visual elements with data dimensions given the data importance, semantic relevance, and glyph non-overlap. The system also provides editing feedback that allows users to customize the MGVs according to their design preferences. We demonstrate the use of MetaGlyph through a set of examples, one usage scenario, and validate its effectiveness through a series of expert interviews.


INTRODUCTION
Glyph-based visualization serves as an effective method for encoding multi-dimensional data [39]. However, glyph designs can also be complex due to the increasing number of data dimensions, leading to comprehension problems. Accordingly, visual metaphors are actively used to draw data-driven glyphs with representative and familiar appearances related to the data [35]. We have seen wide adoption of metaphoric glyphs in various domains, such as sports [32,44], urban application [17,36], and blockchain [68]. Studies have also shown that appropriate metaphors can help people understand glyphs quickly and accurately [13,22,35]. However, incorporating metaphors in glyph designs is not an easy task. Designers have to balance various factors, such as the expressiveness of the visual representations and the effectiveness of data mappings.
Many advanced visualization authoring tools have been developed to facilitate the creation of glyph-based visualizations [4,28,48,62,65,66]. However, it is difficult to balance automation and customization in the creation process. For example, GlyphCreator [65] and Diatoms [4] consider basic geometry or limited shapes and do not have explicit support to create metaphoric glyphs with semantic relevance. Other manual authoring tools allow users to craft the graphical elements from scratch through sketching [62] or interactions [28], which are powerful in customization. Such creation is laborious, and the quality of the final glyphs is highly dependent on the user's design experience and expertise. Using online resources may lower the cost of customization and simplify the creative process [66]. However, users need to manually select and upload the image source online without an image library.
For better results, we aim to automatically generate metaphoric glyph-based visualization (MGV) using online sources. We attempt to ease the creation of MGV for general users who need to encode multi-variant data. However, two obstacles emerge from the process: • It is unclear how metaphors can be embedded into the glyph-based visualization design. In practice, a great number of visualizations [12,63,64,68] have adopted metaphors to represent data. Existing studies [3,59] have recognized that metaphor is a good design strategy to facilitate glyph understanding. However, a systematic review of these designs to guide the creation of MGV is lacking. Detailed and practical designs for MGV have not been proposed yet. • It is difficult to generate an MGV without the involvement of human intelligence. This generation process involves a series of design decisions, for instance, selecting an appropriate metaphor design and binding data with various elements in the metaphor. It requires comprehensive considerations of the whole process to streamline the production. Although increasing work has been conducted on glyph-based visualization, the automatic method for designing and generating an MGV has received less attention from the community. To address these challenges, we propose an MGV generation framework according to a qualitative analysis established on a collection of MGV examples. We systematically reviewed 50 examples from publications and websites to explore the MGVs' designs. The analysis results provide guidance for understanding a metaphor within a glyph-based visualization for the first challenge. Informed by the results, we design and implement MetaGlyph, a proof-of-concept system that allows users to generate MGVs automatically by importing a spreadsheet. We find appropriate metaphoric images online for the data and assess how well the images match the input data in the following steps: First, the images are decomposed into a list of visual elements. Given the visual elements and different data dimensions, we then formulate the mapping problem as a tree search question and introduce a Monte Carlo tree search (MCTS) algorithm to explore the mapping space. Finally, we utilize criteria to estimate the quality of MGVs and select the best MGV based on the rewards. MetaGlyph also incorporates an interface for users to refine the MGV. The main contribution can be summarized as follows: • We conduct a qualitative analysis to understand the design of stateof-the-art MGVs from various stages. • We propose a novel framework by selecting metaphoric images and constructing MGVs. We also introduce a method to estimate the quality of an MGV in the framework. • We develop MetaGlyph, a mixed-initiative system for creating MGVs automatically. We demonstrate the usage of MetaGlyph through a usage scenario and validate its usability through expert interviews.

RELATED WORK
We summarize prior studies that have covered metaphor-based designs, glyph-based visualizations, and currently available authoring tools.

Metaphor-based designs
In linguistics, metaphor, analogy, and simile are three basic elements in language [43]. A metaphor is a word or a phrase that compares one thing to another to make a description more intuitive, like "All the world is a stage" [24]. Similes create a comparison using "like" or "as" [24]. A well-known example of a simile is "Life is like a box of chocolates." The analogy is a comparison between things that have similar features [24]. An example of an analogy is "Black is to white as on is to off ". In visualization, researchers do not explicitly differentiate these concepts, and the word "metaphor" is used to depict the case of interpreting complex information via familiar and concrete objects [35]. By allowing users to maximize their experience and knowledge, metaphors make it easier for users to understand the underlying data. Previous studies have suggested that metaphors promote data comprehension [22,51]. A well-known example is Chernoff faces [10], which maps one data value to one face character like the eyebrows' angle or the nose's size. Later in two quantitative experiments, Flury et al. [20] and Jacob [26] found that face glyphs outperform other visual designs like polygons and digits. Researchers have proved that, compared with glyphs unrelated to data, some metaphor-based glyphs outperform others in accuracy and efficiency through quantitative experiments, such as car glyphs [55] and clock glyphs [21]. Chau et al. [6] found that a combined design that displays glyphs and numbers together performs better in adopting a flower metaphor. Fuchs et al. [23] recently introduced a leaf glyph based on a natural metaphor and proved its effectiveness in illustrative storytelling. Dasu et al. [14] proposed an organic metaphor to interpret conditional co-occurrences and verified the effectiveness of complex tasks.
The concept of metaphor in visualization has a long history. In the 1920s, Otto Neurath and Gert Arntz [42] invented the 'Vienna Method of Pictorial Statistics', which was renamed 'ISOTYPE (International System Of TYpographic Picture Education)' in the late 1930s. They designed a lot of pictographs using semantically relevant icons.
Metaphors have been widely used to visualize different data. Metaphors like clock [19], wheel [2], and radar [61] are adopted to present radial layouts. Spatial metaphors express the relation "proximity ≈ similarity" [41]. Ropinski et al. [52] recommended 3D metaphoric glyphs to visualize spatial multivariate medical data for the attentive phase. Using Fermat's spirals, Lei and Zhang [33] designed the galaxy visualization to display financial time serials. Matchpad [32] used metaphoric pictograms, which are easy to learn, remember and guess. Setlur and Mackinlay [54] generated scatterplots with semantically-relevant icons to replace traditional data points automatically. Users are kept informed by the semantic information during analysis. TenniVis [44] proposed a novel glyph for individual point outcomes in a tennis match inspired by the needle gauge. SmartAdp [36] designed a novel dashboard-like glyph to represent a solution for billboard placements. Coelho and Mueller [11] created Infomages, which utilized thematic images to develop a data chart. A relevant image help users interpret the data. Recently, Compass [17] introduced a compass glyph to facilitate the in-depth understanding of urban problems.
Although these works have demonstrated the great advantages of metaphors in the visualization from different perspectives, none of them have proposed an automatic way to generate metaphoric glyphs.

Glyph-based visualization and authoring
Glyph-based visualization has become prevalent in visualization journals [3,16,57] and celebrated collections (e.g., Dear Data [38]). It performs well especially for multivariate data [3]. However, it is not easy to design and generate a glyph-based visualization.
Thus, many theoretical researchers have focused on how to design glyphs. Ward [58] discussed the process and issues of glyph generation, including mapping data to graphics attributes and layouts. Borgo et al. [3] drew the link between basic concepts in semiotics and glyphbased visualization and summarized existing design guidelines and techniques. Recently, Fuchs et al. [22] provided an overview of glyph types and design characteristics by reviewing experimental studies.
Furthermore, researchers have proposed many authoring tools to ease the difficulties of creating glyphs. Ribarsky et al. [49] introduced Glyphmaker, which allows non-expert users to customize data glyphs. Kim et al. [28] proposed Data-Driven Guides for Information Graphics, a system that can also create glyphs via interaction. Xia et al. [62] developed DataInk, which aims at author glyphs through freedom sketching. Ren et al. [48] presented Charticular, an authoring tool focused on layouts between glyphs. Chen et al. [9] took the first step in creating glyph-based visualization in Augmented Reality environments using mobile devices. Besides creating from scratch, DataQuilt [66] adopted real images for both inspiration and a resource of visual elements for data binding. On the other hand, while scholars have developed several tools to help users create glyphs, users still need a lot of manual operations in the system. The glyph quality highly depends on the user's design experience and expertise. Therefore, scholars have proposed some automatic systems to simplify the process recently. Ying et al. [65] aimed at circular glyphs and introduced GlyphCreator based on an example-based method. Brehmer et al. [4] developed Diatoms, a technique for inspiring glyph design through a sample-based generative process. However, automatic systems only support basic geometry or limited shapes. Unlike regular shapes, metaphors serve as effective methods to help users understand data. Thus, we opt to generate glyphs with metaphors that are not supported by existing systems.

DESIGN OF THE METAGLYPH SYSTEM
In this section, we introduce the design of the MetaGlyph system. To gain a better understanding of MGV design, we surveyed previous work and conducted a qualitative analysis. Based on the findings, we proposed the design considerations (DCs) for the MetaGlyph system.

Data Collection
To better understand how metaphors are embodied in glyph-based visualization, we examined the practice from both academic literature and online design communities.
We collected examples from top visualization conferences and journals (IEEE VIS and TVCG) using the keywords "metaphor" and "glyph" and found 221 papers. We manually examined all papers to ensure the existence of MGVs in the paper. Specifically, we checked whether both keywords "metaphor" and "glyph" appeared together to describe a metaphoric glyph. Some papers were excluded. For instance, they might mention "metaphor" and "glyph" in the related work for two different works, respectively. As a result, we collected 20 examples in the literature as the initial corpus.
To further expand the diversity, we collected more examples from creative websites (e.g.,Behance and Pinterest) with keywords such as "information visualization" "metaphor" and "glyph". We adopted an initial filtering standard of MGV based on our current corpus. Then, we collected the chosen examples as a new part of our corpus. Finally, a total of 50 MGVs were collected as our corpus.

Qualitative Analysis
To further understand the design of an MGV, we conducted a comprehensive analysis for all examples in our corpus. In general, we analyzed all MGVs in three stages by decomposing them step by step. S1 We find out how metaphors are embodied in an MGV and analyze the pattern of the glyph placement based on the overall design. S2 We drill down into a single glyph and consider its layout. S3 We aim at different visual elements that compose one glyph. Three authors went through our corpus and independently analyzed all examples following the above stages. All disagreements were resolved through iterative discussions. S1: At this stage, we focus on MGVs' general design to understand how designers embody the metaphor and place all glyphs in the MGVs. • Metaphor Type. In our corpus, we find that designers use metaphors with respect to data properties and generally divide all examples into two conditions: semantic-related and structure-related. The former indicates the metaphor is related to the topic of data, for example, a coin representing transaction data [68], and a dashboard representing speed data [36]. In this condition, designers commonly use a metaphor within one glyph design. The latter illustrates that the metaphor is related to the data structure. For example, researchers used blooming flowers in a glyph-based visualization to express hierarchical data [19]. For data about model optimization, researchers may choose the clock metaphor [67] since it is time-related. In this condition, the metaphors are mainly embodied in the visualization layout. Moreover, some designs are both semantic-related and structure-related. The concrete amounts of different metaphor types in our corpus are shown in Fig. 2(a). Finally, the definition of a valid MGV is: using a visual design that suggests a particular association or similarity with data [29]. • Glyph Placement. In our corpus, we code the glyph placement of MGVs into two groups according to Ward's theory [58]: data-driven and structure-driven. Data-driven placements correspond to glyphs that are placed based on data values. Some data values are directly used as the x-or y-value. Others need computations (e.g., projection space) to derive the position. Glyphs are usually placed in a Cartesian coordinate system in a data-driven group. The structure-driven group assumes that the data have structural characteristics. It is also a method to present metaphors. Some placements are based on a specific object, such as a tree for hierarchical data [27] and a map for geospatial data [45], or a timeline for time series data [50]. Designers adopt metaphors in structure-driven placements, such as a map with landscape and a clock for data ordered by temporal data.
Other metaphors use a typical ordering relationship based on categorical information. Glyphs may be arranged evenly between left and right or located with an organization considering non-overlapping. In some cases, designers adopt two placements together for better visualization. Fig. 2(b) indicates the statistics on the corpus. S2: We then drill down into the design of one glyph. We focus on different glyph layouts in this stage. • Glyph Layout. As glyphs are frequently designed in a radial structure [65], we discuss the glyph layout in two groups: radial and non-radial. Fig. 2(c) displays the used frequency of two groups in our corpus. A radial glyph is a glyph whose elements are organized on a polar coordinate system. Each element shares the same origin. Most elements have a radial shape, like a circle and a sector. Non-radial glyphs can be placed in a Cartesian coordinate system. Notably, some glyphs present a linear structure, that is, elements in such glyphs are arranged vertically or horizontally. Others are arranged relatively freely, such as to compose a specific object like a car [55]. S3: A glyph is composed of different visual elements encoded by different data dimensions. In the last stage, we focus on the visual elements and discuss some findings of data mapping. • Visual Element. Ying et al. [65] divided all visual elements in a circular glyph into four categories: chart, shape, icon, and text. Given the peculiarity of metaphor, we mainly consider two of these categories: shape-level and chart-level. The shape-level element refers to different shapes, including basic geometry (e.g., circles, polygons) and complex shapes (e.g., leaves). A chart-level element is a variant chart within a glyph, which is also a unit of shape-level elements. We integrate these shape-level elements because the unit (e.g., a pie chart) conveys more information than a single component (e.g., several sectors). In our corpus, designers adopt pie charts, donut charts, star plots, heatmap, and boxplots when designing glyphs. • Element Number. The information conveyed by one glyph is limited. A glyph can better represent data in 2 to 4 dimensions [3]. According to the statistics from our corpus, the frequent amount of encoded elements of a metaphoric glyph is between 2 and 6 ( Fig. 2(d)). • Data Mapping. The mapping relationship of the data and elements is important for presenting the final visualization. For a given data dimension and a given element, the encoding channel is mainly determined by the data type. Fig. 2(e) presents the frequently used data types and the preferred encoding channel. Moreover, we have two interesting findings in our corpus. First, among all elements in an image, some elements may contain additional semantic information, such as the two circles in the car referring to wheels. Designers prefer to encode such elements with correlated data. In a car, MPG (miles per gallon) is more relevant with the wheel than the car body, and designers prefer to use the wheel size to encode MPG. Second, data with similar attributes can be encoded in the same way. For instance, Chau et al. [6] used different leaf elements in a metaphoric flower glyph to encode external and internal links of the webpage.

Design Considerations
We aim to design a system to generate MGVs automatically from a spreadsheet. We summarize three primary DCs to guide the design. DC1 Generate a semantically-resonant MGV. Using metaphors, successful MGVs can promote the interpretation of the input data. Therefore, it is critical to choose an appropriate metaphoric design with respect to the data semantics. We likewise consider the rationality of the mapping between specific data dimensions and individual visual elements. The system should consider both factors and ensure the quality of the final output MGV. DC2 Support automatic and efficient MGV generation. Abundant online image resources provide design inspirations and create an opportunity for the automatic generation of MGV. However, selecting one appropriate metaphor image from abundant online sources is difficult. People must remember complex data features and consider multiple data mappings. Manual data mapping is labor-intensive since users need to calculate different attributes (i.e., size and angle) for encoding. Thus, we plan to automate the process to ease data exploration through quick generation, including image selection and data mapping. On the one hand, due to the large size of online images, it takes a long time to test various combinations of images to generate an appropriate result.
On the other hand, users feel tired of waiting for a result when all online images are required to be transformed and combined. Thus, we set multiple filter conditions in different steps to balance the quality of MGV and the time spent on the creation. DC3 Integrate a mixed-initiative workflow. Although an automatic system provides convenience, the generated visualization may not satisfy users' expectations. Therefore, users should engage in the creation process [53]. We consider a mixed-initiative workflow that integrates the machine's and human being's efforts. Our system provides some initial results for users to choose from and change by the given spreadsheet. Then, after modifying visual elements for specific data dimensions from users, MetaGlyph improves the final output and provides alternatives based on the users' preferences. To follow this practice, our system should provide a collaborative design workflow.

MGV GENERATION MODEL
This section introduces our two-step model to generate MGVs, including selecting metaphoric images and constructing MGVs.

Selecting Metaphoric Images
To construct valid MGVs for the given input data, we first decide on appropriate metaphors with corresponding images. This subsection elaborates on the process of metaphoric image selection, including segmentation, pruning, and augmentation. After obtaining candidates, we select one image each time for subsequent operations in Sect. 4.2.
Based on the findings from Sect. 3.2, we summarize two criteria to determine the right image: • C1: It is semantically related to the data. • C2: It is a vector image with a relatively simple structure. First, we can derive C1 directly given the definition of MGV [29]. For C2, vector images are easy to edit and reuse compared to raster images, which correspond to our needs for data binding. As discussed in Sect. 3.2, it is more appropriate to determine the number of the encoded visual elements within the range from two to five. Given that complex images will lead to high understanding costs, the source images of glyphs should be simple and easy to perceive. According to C1 and C2, we search eligible images on the Internet.
Given a spreadsheet, we can obtain general information about the dataset. The spreadsheet name is regarded as the topic of the dataset. We choose SVG Repo 1 to search for eligible vector graphics following C1. The format of the vector graphics meets the condition, and their structure is simple for subsequent operations (C2). In addition, we use the Google Image Search Engine as a supplement to ensure the diversity and abundance of candidate images. We use the keyword "icon" and convert the resulting bitmap images into SVG using an opensource package Portace. As a result, we get a first-version candidate metaphoric image list in this step. Next, we filter these candidates through subsequent processing steps, as shown in Fig. 3.
Segmentation. We need to segment each image as elements from the previous output list. Given that an SVG file comprises several paths, we convert each path into an individual SVG file to obtain an element list using the SVG format. We derive n files corresponding to the n paths and calculate the center C i (i = 1, 2, ..., n) of each retained element to determine the overall center of glyph C 0 .
Pruning. Given all visual elements, we prune non-essential elements following C2 and determine the image structure. To map data effectively, we remove tiny overlapped elements temporally, as associating the information with such elements will not improve the understandability. We heuristically found tiny elements were those occupying less than 0.5% of the area of the whole image, which reached a good compromise between the understandability and aesthetics. For instance, elements with center C 3 and C 4 in Fig. 3 are removed in this step. Next, we decide on the image structure based on preserved elements. We follow the same classification as discussed in Glyph Layout (Sect. 3.2) since the image is the vital material to construct a metaphoric glyph. The distinction is used for further data mapping. We use the center position {C 0 ,C 1 , ...,C n } to confirm the structure. As discussed in Sect. 3.2, we check whether the origin of the polar coordinate system exists by analyzing all elements' center. We first derive a possible rough origin position P o based on the center of the glyph. If more than one element's center is close to P o , we define this image as a radial structure and vice versa. For example, in Fig. 3, since four circular elements and the whole glyph have the same center C 0 , the image is regarded as a radial structure. For non-radial images, we check if the centers of all essential elements C i can be connected in a nearly straight line with slope k.
Augmentation. In this step, we transform original basic shapes into charts and integrate them into the glyph design. According to our findings in qualitative analysis (Sect. 3.2), we find 5 cases (star plot, donut chart, pie chart, heatmap, and boxplot) in existing research and design. Some charts are directly derived from a circular shape while others (heatmap and boxplot) need extra transformation [36,37]. Therefore, we add an extra tag for circular elements because they can transform into charts.
After the above operations, we get an element list. We define the image as follows: where e i refers to different visual elements, a i is a boolean variable indicating whether the element can be augmented, p i describes a path in an SVG file, and S represents the image structure. For a non-radial image, we also record the slope k. For each image in the first-version candidates, we derive an element list for the following step.

Constructing Metaphoric Glyph-based Visualization
This subsection introduces the method to construct an MGV. We first formulate our problem into a mathematical form and then give a solution overview, including mapping data to different visual elements and placement as well as glyph rendering in MetaGlyph.

Problem Formulation
To generate an MGV, we select several data dimensions from the given spreadsheet, pick some visual elements from the element list, map the selected data attributes to the chosen elements and determine the placement. We also determine the visual encoding channel for each pair of one data attribute and an element. The position attribute for glyph placement (discussed in Sect. 3.2) is also based on data. We adopt two variables, α 1 and α 2 , to present both data-driven and structure-driven glyph placements. The two variables are clear for data-driven placement to present numerical data due to a Cartesian coordinate system. We consider several specific objects (map, timeline) and order relationships according to data features for structure-driven placement. One variable α 1 is enough to present this data group. We need one categorical data dimension for the map and order relationship, and one temporal data for the timeline. As the ultimate effect of the MGV is determined by glyphs and placement, we consider them together. Moreover, we take the whole image as an extra visual element e 0 because it often encodes data.
We formulate the problem as: given data D = {d 1 , d 2 , ..., d n }, we select n mapping pairs P for each data dimension to solve: where R mgv is the reward function for a solution, P D,L = {p 1 , p 1 , ..., p n } is all mapping pairs, as shown in Fig. 3(e). Each mapping pair can be represented as: where i ∈ [1, n], j ∈ [0, m], k ∈ {1, 2} and ∅ is an empty set. d i ↔ e j means the data dimension is mapped with an element (yellow arrows in Fig. 3(e)). d i ↔ α k shows the data dimension is mapped with one axis of placement (the black arrow in Fig. 3(e)). Since we do not present all data dimensions in an MGV, some dimensions are not displayed. d i ↔ ∅ represents this condition (the black dotted arrow in Fig. 3(e)). Above all, we should guarantee the quality of the final MGV. The number of axes α k is one or two to ensure a successful visualization. For Equation 3, the amount of valid pairs (d i ↔ e j , d i ↔ α k ) is an unknown variable, which means we can choose one pair, two pairs, or even all data for data-mapping. With the above considerations, the mapping space can be large for this question, even for a small dataset. Moreover, intermediate results are not worth referring to until all mapping pairs are determined. We cannot enumerate all solutions first and pick some reasonable ones as the output since a long waiting time for users violates DC2. We address this problem using an efficient method named MCTS [41], which is proposed to search for the best next move in a game. This algorithm can efficiently and logically explore a large space via a tree structure.

Monte Carlo Tree Search
We explore the mapping space by constructing a searching tree T . Each tree node is a visual element e i or an axis α k from the elementplacement list. We start from an empty root node, as shown in Fig. 4(b). The mapping pairs (Equation 3) are represented as Node's Height ↔ Node, where the Node's Height corresponds to a data dimension d i , and the Node is one of three options in Equation 3. In MCTS, nodes close to the root are usually explored more fully. Therefore, the order of data dimensions weighs a lot for the resulting mapping method. We adopt an importance score to estimate the importance of all data dimensions and put the higher score dimension at the top of the tree. The search process repeats four stages starting from an empty node: selection, expansion, simulation, and backpropagation. Then, one mapping method is generated by a path from the root to a leaf node. After identifying one data dimension and an element, we choose an encoding channel according to the data type and element feature as discussed in Sect. 4.2.3. We also design a reward function to estimate the quality of all generated MGVs.
First, we need to order all data dimensions before building a mapping tree. We estimate the importance of one data dimension based on its relevance to the data topic. Semantic text similarity is commonly used in the natural language processing field [25], like machine translation and image caption [34]. Researchers use word embeddings to represent the original text information. Since the description of one data dimension is usually a phrase aside from a word, we choose sentence embeddings. Among existing state-of-the-art models [31,40,47], we choose sentence-BERT [47], which is suitable for calculating sentence distance and avoids massive computational overhead. We use cosine distance, which is widely used to measure distance in vector space. Consequently, we rank the data dimensions by calculating the distances between the description of data dimensions and the data topic.
We group numerical data dimensions with similar meanings as G d , such as math and music scores, and apply the same encoding method to the grouped data dimensions. While the visual elements are being mapped, these groups are treated the same as other data dimensions. They cannot be considered as axes α. We compute the importance of the data dimensions by using the average distance: dist G = dist d , where dist d is the individual importance score of integrated data dimensions. We also prioritize these groups and put them at the top of the tree ordered by their ranking as shown in Fig. 4(a).
Selection. A mapping tree is initialized with an empty root node, as shown in Fig. 4(b). In the selection stage, we aim to find the most promising element node e i . This step starts from the root node and selects a child node with the maximum upper confidence bound for trees (UCT) [5] each time. Generally, UCT considers the balance between less-visited and high-valued nodes: where r i is the reward value, n i is the visited times of e i , N i is the visited times of the parent node, c is a constant. After multiple experiments, we used c = 4 since it performs better. The selection stage ends until the most urgent expandable node is reached. A node is expandable if it has unvisited (i.e., unexpanded) children. Expansion. One child node is added to expand the tree in the expansion stage. We add a random visual element or axis node to expand as shown in Fig. 4(c) and initialize the visited time and reward as zero. Remarkably, we can add an empty node to expand because we do not present all data dimensions. For individual data dimensions, all elements in the list L = {e 0 , e 1 , ..., e m , α 1 , α 2 , ∅} are alternatives. However, for data groups, axes α i are excluded.
Simulation. A simulation process starts from a new node and uses a rollout policy to produce an outcome, as shown in Fig. 4(d). The rollout policy randomly chooses a node to expand recursively (like the step in the Expansion stage) until the node cannot expand, which means all data dimensions have been mapped at that time. To simulate more quickly, we do not pursue a high reward in this stage. Our goal is to simulate more times to get a high reward in a limited time.
Backpropagation. In this stage, the simulation result is backed up to update the selected nodes (Fig. 4(e)). New nodes are also added to the tree T with a reward value and one visited time. Other visited nodes need to update a reward value if it is bigger and add one visited time. Then the search process returns to the selection stage or terminates when the time limits are exceeded, or the search tree is exhausted.
Finally, the path with the highest reward value is identified as the best matching method in this generating iteration.
Reward Function. We propose a reward function to estimate the quality of the final MGV via three criteria: importance (I), semantic relevance (S), and overlapping (O): where e is one of the selected visual elements, d is one data dimension or one data group, α is one of the axes, and N α is the number of axis nodes. We should check the number of axes (α) in the derived mapping method to guarantee a valid MGV. We removed all empty nodes at that time due to their zero importance.
• Importance Score estimates the importance of one data dimension or group. Since a cosine distance orders the importance mentioned above, some scores will be negative, which violates the reward calculation of MCTS. We normalize the distance as Importance Score I to ensure the feasibility of our model. • Semantic Score estimates the semantic relevance between a visual element and one data dimension. As discussed in Sect. 3.2, designers prefer to encode visual elements with correlated data. We adopt the Transformer-MM [7] to bridge a text and image. Chefer et al. [7] used the attention layers of the model to produce relevancy maps for image and text interactions. We choose the model CLIP [46] to derive our semantic relevance score due to its abundance. It learns from 400 million text-image pairs already publicly available on the Internet. Specifically, we first convert the origin SVG into a pixel image. Given the pixel image and a textual description of one data dimension (d ∈ D), we derive a heatmap of pixels corresponding to the description and normalize its value. Next, for a visual element e, we calculate the average relevance of the area covered by it as the final S. We adopt different scores based on data type separately for axes. When presenting temporal data or geospatial data, the S is assigned one since such placement is semantically-resonant (DC1). We use the entire image for other data types to derive the relevance score S because the placement is relevant to all elements. • Overlapping Score estimates the overlapping degree of the final MGV. We calculate the overlapping areas in the MGV rendered in Sect. 4

.2.3 based on the bounding box of each glyph:
where P overlap is all elements' average overlapping percentage.

Rendering
Given a visual element, the glyph placement, and data dimension, we need to make the encoding channel clear for rendering. Encoding Channel for Visual Elements. As mentioned above, all data dimensions are divided into d (one data dimension) and g (a data group). Moreover, we divided all visual elements into e a and e !a for different value of the augmentation tag a i retained in Sect. 4.1. e a corresponds to a = 1 and vice versa. We consider three conditions separately for different visual elements and data dimensions: • d ↔ {e a , e !a }. Since the data input is only one dimension, we treated {e a , e !a } the same. Although element e a can be augmented, we preserve its original shape for a better representation. We use a heuristic method based on examples in our corpus (Fig. 2(e)). We determine the encoding channel by analyzing the shape of elements and the data type. Given a data dimension, we select the most frequent encoding channel based on its type. When two or more data dimensions share the same element, we order them based on the reward function (Equation 5). Dimensions with a higher reward can occupy a more frequent encoding channel. When using size channel, we need an additional decision based on the image structure (Equation 1). Height, length, and area are three options for ultimate encoding. • g ↔ e a . For the pair of data groups and elements that can augment, we transform the element into different charts to present all dimensions in the group. We adopt four charts, namely, pie charts, donut charts, star plots, and heatmaps as shown in Fig. 3(d). For numerical data, we consider star plots. Specifically, pie charts, donut charts, and heatmaps are alternatives for proportional data. • g ↔ e !a . We use a typical design in our corpus with visual elements that cannot augment. We choose three encoding channels (rotation, color, and size) of one visual element to represent a data group. Rotations and colors are both used to distinguish different data dimensions in the group. The size encodes the numerical data. An example is displayed in Fig. 1(b). The leaves are rotated to illustrate the forest area in different years. Color is also utilized to distinguish the value year, as shown in the legend (Fig. 1(b1)). The size of the leaves represents the percentage value. Notably, we check if the removed elements e r in Pruning (Fig. 3(c)) need to be drawn after confirming encoding channels. We call the preserved element that overlaps with the removed one as e p , and the encoding channel for e p as c p . If e p encodes data and c p is size, we scale the e r the same as e p and add it into the glyph. If e p is transformed into a chart or does not encode data, we delete the element. For other conditions, we keep it in its original shape for drawing.
Glyph Placement. Owing to the limit in the simulation stage of MCTS, we only need to consider the independent data dimensions d and the axes α. For temporal data, we use a timeline to illustrate following DC1. For geo-spatial data, we utilize a map ( Fig. 1(b) and (f)). For other numerical data, if the number of axes is one, we adopt a horizontal axis to place glyphs. A Cartesian coordinate system is the right choice with two axes, as shown in Fig. 1(a) and (e). Concerning categorical data, we place glyphs in a specific order as shown in Fig. 1(c) and (g).
Ultimately, we can obtain one semantically-resonant MGV with the highest reward for each image candidate. We pick the greatest as the output based on all candidates' reward values, and others are ranked as alternatives for users to choose from.

METAGLYPH
This section introduces the workflow of MetaGlyph that generates MGVs given a spreadsheet input and the interface design.

Workflow
We design the workflow of MetaGlyph based on the design considerations proposed in Sect. 3.3. Following DC3, MetaGlyph integrates the automatic model and user interactions into the authoring process. First, users need to import a spreadsheet of data as the input. An initial MGV is generated based on the automatic model. The quality of MGV is ensured by a reward function that considers different dimensions, including data importance and semantic matching (DC2) as discussed in Sect. 4. After that, users can modify the data mappings and the encodings of the initial visualization result. The automatic model will re-calculate and create a new MGV based on users' input. To ensure the efficiency of the computing following DC2, we limit the search number of images at one time. Next, users can smoothly switch between different visualizations and refine the satisfactory one as the final output. Given that both the users and the model contribute to the design of the MGV, MetaGlyph can derive more novel and creative designs compared with a solo-authoring workflow.

User Interface
The MetaGlyph (Fig. 5) consists of four views: Menu view, MGV view, Gallery view, and Edit view. The Menu view shows the creation procedures of our system, that is, first upload, then preprocess, and ultimately edit the visualization. Our system only needs one data input. Users can upload a spreadsheet, and our system will process the data. After the system's calculation, we can derive several MGVs with high rewards within a suitable waiting time (DC2) using the MGV generation model in Sect. 4. Moving to the edit step, the MGV with the highest reward is presented in the MGV view ( Fig. 5(b)), and the other alternatives are shown in the Gallery view ( Fig. 5(d)). Moreover, all segmented visual elements of the image are displayed on the left of the MGV view. Here, Element 0 represents the entire metaphor. Users can select other MGVs in the Gallery view following their preferences. When hovering over the alternatives, we display the original metaphor ( Fig. 5(d1)). The Edit view will show all mappings and allow users to modify them (Fig. 5(c)). Each small panel illustrates detailed information about one data dimension or one data group, including the title of the data column, data type, element mapped, and corresponding encoding channel. The ordering of different data dimensions depends on the importance score discussed in Sect. 4.2. We use a small icon to illustrate the data type after its title. For data that are not represented in the current MGV, the mapped element is shown as None. Users can alter the data mappings by changing the visual elements in corresponding panels in the Edit view. After clicking the Update button in the MGV view, the generation model will re-calculate to obtain a satisfactory result following DC3. Finally, by clicking the Export button, users can export the MGV shown in the center as an SVG file.

Usage Scenario
We present one usage scenario in detail in this section. Adam is a junior visualization researcher. His task was to analyze the ingredients and nutrients of different hamburgers in McDonald [1] for customers to make a better choice. He uploaded the processed tabular data in the MetaGlyph system and clicked the "generate" button. After a few seconds, the system generated a list of MGVs, as shown in Fig. 5. The MGV in the center represents three data dimensions: burger lettuce, sugars, and bacon (Fig. 5(e)). After browsing and absorbing the concrete mapping relations displayed in the Edit view (Fig. 5(c)), Adam quickly understood the encodings of the glyph. Bread is a kind of carbohydrate. Therefore, the size of the upper bread is appropriate to encode the data attribute Sugars. He was also satisfied with the method to show Burger Lettuce and Bacon using green and red lines (Fig. 5(e)) due to the intuitiveness. He clicked three titles of corresponding data dimensions in the Edit view (Fig. 5(c1)) to add three limits for the next update. Next, Adam obtained a new result and continued exploration for other alternatives in the Gallery view (Fig. 5(d)). Reanalyzing the dataset, he considered grouping some data columns, including iron, calcium, vitamin A, and vitamin C, since these are often considered as nutrients. He returned to the Preprocess step ( Fig. 5(a)) and added one data group. This time he found an interesting MGV, which adopted a heatmap-like design on the upper bread to represent the new data group. Adam preserved this design and adjusted other mappings following his preferences. After clicking the legend button ( Fig. 5(b1)), he understood the encodings for the upper bread ( Fig. 6(a)). Using such a design, he could grasp different levels of four components at first sight. Other encodings are displayed in Fig. 6. The numbers of red lines and green lines illustrate the amount of bacon and lettuce layers, respectively. The length of the bread below represents the Sugars. Satisfied with this result, he exported this MGV.
Following a similar procedure, we demonstrate the expressiveness of MetaGlyph by creating more MGVs with various datasets ( Fig. 1). These examples are hard to create with existing tools. For example, automatic tools (e.g., GlyphCreator [65], Diatoms [4] do not provide explicit support for metaphoric glyph design. Authoring tools (e.g., DDG [28], DataQulit [66]) provide greater flexibility and allow users to achieve similar results. However, the authoring process is tedious and time-consuming (e.g., requiring users to find or draw suitable metaphor images and encode data), and the quality of MGVs is highly dependent on the user. Moreover, they do not support embedding charts in the glyphs (e.g., star plots in Fig. 1(a) and pie charts in Fig. 1(f)).

EXPERT INTERVIEW
To evaluate the MetaGlyph system and generated MGVs, we performed a series of interviews with three expert users in different fields. The first expert (E1) is a data journalist who has worked for a digital-news firm for more than three years. The second expert (E2) majored in visual communication and has more than ten years of design experience. The third expert (E3) is a senior researcher who has studied humancomputer interaction and data visualization for more than eight years.
Procedure. We conducted the interview via an online meeting system. Each interview began with a 10-minute introduction of MGV following a 10-minute demo of our MetaGlyph system. Next, the experts were encouraged to use MetaGlyph online on their own. After thorough trials of our system's features, we asked experts to generate MGVs using the Burger and Pokemon datasets introduced in Sect. 5.3.
We recorded their creation process in a think-aloud approach. Our interviews were seeded with a set of questions that probed into the effectiveness of MetaGlyph and the quality of the generated MGVs.
The one-hour screen capture videos and audios were recorded from these interviews for further analysis.
Feedback. In general, all experts expressed their compliments of MetaGlyph and agreed on its promising usage. We summarized the interview results from three perspectives: Workflow. Three interviewees appreciated the overall design of the workflow. All of them expressed the effectiveness of integrating metaphors into the design. They believed that the automatic system is an efficient way to speed up the generation. During their previous creation, they preferred design software (e.g., Adobe Illustrator) or programming (E1, E3) after confirming the design ideas. E1 said, "Some of my colleagues write codes, but it requires long-time learning." E3 commented, "When using design software, I need to do time-consuming batch work." She also expressed the difficulty of dealing with some visual elements, such as adjustments of arc angles. With MetaGlyph, she thought the creation process would be more straightforward.
System. All experts were satisfied with the design of MetaGlyph. They appreciated the aesthetics of the interface and expressed the ease of learning cost when using MetaGlyph. E1 noted, "The interaction is intuitive, and I can use it proficiently after a simple demonstration." For the designs of different views, E2 observed the Gallery view and commented, "Due to the difference in users' visual experience, their understanding ability is disparate. It is considerate to provide various alternatives for them." E3 liked the Edit view, "I prefer to try different results on my own. Although the system's results are nice, I can derive a different version by changing some attributes in the edit view." Visualization. In terms of the quality of generated MGVs, all interviewees agreed that the outputs were thoughtful due to the semantic relevance and metaphor embodied. E2 underscored the match pattern for data and visual elements in MetaGlyph, which he also focused on during his design. He said, "Important data should be mapped with prominent elements." He also agreed with the limitation of the number of encoded data dimensions, "It is essential to make trade-offs to data, such as preserving three data dimensions. Too much information will lead to comprehension problems." E1 and E3 both commented that MGVs could serve as the basis for creative work in their early design. E3 said, "When designing, the most struggling part is the beginning due to the large design space. The outputs not only give me a direction but also broaden my scope via some unexpected designs." She agreed to use online sources since such images meet most people's cognition. Therefore, the MGVs can be better understood by audiences.
Suggestions. We also received suggestions from different aspects. As an editor, E1 focused on the stories behind the data and suggested that corresponding conclusions can be generated automatically together with MGVs. E2's advice fell into the improvement of visual comprehension. He was confused about some specific values in the output MGV such as the size of the burger layer represents. E2 suggested adding more annotations and textual descriptions into the MGVs. He noted that color could also be considered in understandability. E3 gave some advice from the perspective of an interaction designer, such as the button position and the highlight effect. She also suggested exporting more files (e.g., legend, files of different elements, mapping space between data and elements) together with the MGV, thereby allowing further refinement using professional design tools. We further revised the system according to her suggestions.

DISCUSSION
This section reflects the implications and limitations of MetaGlyph.

Implications
In this paper, we contribute an automatic approach to generating glyphbased visualization associated with comprehensive visual metaphors to help people understand data in an intuitive manner [22]. We propose the semantic-based generation framework by selecting resonant metaphorical images and mapping visual elements with data dimensions considering data importance and semantic relevance. Users can customize the resulting MGVs based on their requirements. We derive a set of implications in the design process of our system.
Automating glyph designs in association with semantic-resonant metaphors. Metaphors are widely used in visualization, which associates data semantics with figurative motifs. MetaGlyph aims to automatically generate glyphs whose visual elements are associated with semantically related metaphors. To this end, we first search for appropriate metaphors with images considering the overall topic of the input data. Furthermore, we decompose visual elements of the metaphor and match them with data attributes with respect to the underlying semantic relations by adopting a prediction model. For example, the system searches burger images for the dataset of burger ingredients and maps the lettuce and bacon to the green and red elements, respectively (Fig. 6). In this way, the resulting MGVs are associated with the underlying data semantics cohesively. Balancing design expressiveness and perceptual effectiveness. The increase in data dimensionality leads to a complicated metaphoric glyph design that is difficult to understand [3]. Our qualitative analysis (Sect. 3.2) and expert interview (Sect. 6) both indicate the constraint of the number of encoded data dimensions. Besides, our expert E2 suggests emphasizing important data with prominent visual elements, "I will not utilize all elements for presenting data. It would be overwhelming." Some visual elements in the metaphor are better used to encode data attributes, while others are more suitable for decoration purposes. Accordingly, the encoded data dimensions and visual elements should be balanced with perceptual constraints. Our current approach has filtered MGVs that utilize overmuch elements in the mapping space (Sect. 4.2.2). Further experiments are encouraged to explore the appropriate amount of conveyed information in an MGV that informs better automatic generation criteria with perceptual effectiveness. Supporting a human-machine teaming approach. We situate MetaGlyph as a human-machine teaming system that integrates the machine with users' feedback. Incorporating metaphors into designs is generally considered a highly creative task, requiring implicit knowledge to determine the right imagery and modify it to fit scenarios. Faced with the large search space of metaphors and data mappings, generating MGVs is time-consuming and laborious. Automating the laborintensive parts with machines is highly required. Moreover, MetaGlyph provides more than tool-level assistance. It explores the search space for users to compare design alternatives. Both novices and experts can benefit from the rapid results of the initial designs. Users are likewise supported to modify the results based on their preferences. With the machine's assistance, users can focus on the data mappings without adjusting the elements' attributes manually. Moreover, MGVs can be updated multiple times according to users' requirements and the machine's re-calculation. By assigning the labor-intensive part to the machine and providing the connectors of subjective decisions to human beings, MetaGlyph provides a successful human-machine teaming example and inspires the design of visualization tools in the future. Providing design inspirations.
All experts appreciated how MetaGlyph allowed them to discover unexpected designs. Given that the design space of MGVs can be much large considering both metaphor selection and visual mapping, it would be impossible for designers to try all alternatives. In addition, as mentioned by E3, designers are likely to start with familiar designs based on their usual practice. Instead, the machine enumerates all possibilities, which may result serendipitously in promising designs. For example, E3 praised the star plot inside the Pokeball ( Fig. 1(a)) and the flower-like leaves ( Fig. 1(b)). "I never thought of using such designs for these datasets. The visualization created by MetaGlyph shows diverse design possibilities," E3 said. Designers can further refine the design using MetaGlyph or export the whole design assets for fine-tuning with professional tools.

Failure Cases and Limitations
Failure Cases. We observed several wrong or bad cases during the development of MetaGlyph. First, one critical source of some failure cases is the diversity of images the system searches from online sources as the metaphors. For example, some images may have elements in multiple layers, such as Fig. 7(a) shows a car with a background. When scaling the car to encode data, the system cannot guarantee that the car can always be within the background, resulting in an incomprehensible MGV. Second, as we currently adopt some heuristic methods to decide the layout (Sect. 4.2), it cannot always be true. For example, Fig. 7(b) is wrongly identified as a radial glyph as it has two elements whose centers are close to the SVG's center. Future work can use new techniques in computer vision and deep learning to optimize our framework.
Limitations. First, the degree of customization for MetaGlyph is limited. Specially, we follow the default style of the metaphoric source image, and use fixed parameters when calculating (e.g., set the boundary 0.5% in Pruning in Sect. 4.1). Future work can allow users to customize their MGVs, including but not limited to styles [8] and a custom field of parameters. Second, MetaGlyph only supports tabular data with a single sheet, while complicated data structures, such as graph-related data, are not supported. Because graph-related data can be represented as multiple-sheet data (e.g., adjacency matrices), we plan to extend MetaGlyph with more data processing operators to integrate multiple data sheets in the encodings of a single glyph. In this way, we can improve the diversity of the resulting visualization for MetaGlyph. Third, we mainly consider the importance of data dimensions and their semantic relevance with visual elements in data mapping. Other factors (such as SVG elements' sizes and shapes, mapping different elements with different channels, and users' priori knowledge) also play roles in the mapping. Future research can further explore how to consider all these factors to achieve a better MGV design.

CONCLUSION AND FUTURE WORK
This paper presents MetaGlyph, an automatic system for generating MGVs. We first conduct qualitative analysis to understand the design patterns of MGVs and then develop an automatic generation framework. We automate the entire process by searching for appropriate metaphors, processing images, and determining multiple data mappings along with visual encodings. Given the ample mapping space between visual elements and data dimensions, we adopt an MCTS algorithm to achieve an efficient and effective search considering data importance, semantic relevance, and glyph separation. By uploading tabular data, our system will generate several MGVs within a few seconds. Moreover, as a human-machine teaming system, MetaGlyph enables users to modify the MGVs following their preferences. We evaluate MetaGlyph through two usage scenarios and a gallery of examples and demonstrate its effectiveness via a series of expert interviews. MetaGlyph shows its potential in various situations, such as education [30] and journalism. Teachers can use MetaGlyph to create metaphoric designs to help teach data literacy or visual encodings, while journalists can use it to create figurative and expressive visualization easily and quickly.
Looking into the future, we hope our work can inspire further research from the perspectives of design expressiveness and perceptual effectiveness with regard to different visual representations (e.g., storyline [56], data comics, and visual analytics systems [60]). First, we plan and also encourage researchers to conduct empirical studies to investigate how different users understand metaphoric visualizations. Cognitive experiments can likewise be designed to derive metrics for the effectiveness of metaphor selection, so that more theories about computational metaphors can be constructed. In turn, the theories can be utilized to inspire the development of future visualization tools. Second, research on automatic visualization generation [18] can benefit from large-scale visualization datasets (e.g., VisImages [15]). Future work can focus on constructing glyph datasets to facilitate the use of end-to-end deep learning models for an efficient generation.