CirclizePlus: using ggplot2 feature to write readable R code for circular visualization

In the R programming language, the de facto standard framework for drawing rectangular coordinates is ggplot2. The most important feature of ggplot2 is that it is object-oriented and uses the plus sign to overlay various objects. In the field of circular visualization, circlize is a popular software...

Full description

Saved in:
Bibliographic Details
Main Authors: Zheyu Zhang, Tianze Cao, Yuexia Huang, Yu Xia
Format: Article
Language:English
Published: Frontiers Media S.A. 2025-03-01
Series:Frontiers in Genetics
Subjects:
Online Access:https://www.frontiersin.org/articles/10.3389/fgene.2025.1535368/full
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850063158609182720
author Zheyu Zhang
Tianze Cao
Yuexia Huang
Yu Xia
author_facet Zheyu Zhang
Tianze Cao
Yuexia Huang
Yu Xia
author_sort Zheyu Zhang
collection DOAJ
description In the R programming language, the de facto standard framework for drawing rectangular coordinates is ggplot2. The most important feature of ggplot2 is that it is object-oriented and uses the plus sign to overlay various objects. In the field of circular visualization, circlize is a popular software, but it is based on procedural programming. Making it object-oriented can make the logic of the written code clearer and improve the reusability of the code. In this work, we introduce circlizePlus, which redesigns the concepts in circular visualization into several R S4 classes. It also defines a set of additional rules, based on which users can implement ggplot2-like drawing techniques. circlizePlus is a wrapper for circlize. It transforms the procedural programming style of circular visualization drawing into object-oriented programming. The additional rules it defines reduce the amount of coding and make the code more readable. The source codes can be found at https://github.com/tianzelab/circlizePlus, and the sample code can be found at https://tianzelab.github.io/circlizePlusBook/.
format Article
id doaj-art-aa7b6fab479a447da6262e2e4ecdd82d
institution DOAJ
issn 1664-8021
language English
publishDate 2025-03-01
publisher Frontiers Media S.A.
record_format Article
series Frontiers in Genetics
spelling doaj-art-aa7b6fab479a447da6262e2e4ecdd82d2025-08-20T02:49:44ZengFrontiers Media S.A.Frontiers in Genetics1664-80212025-03-011610.3389/fgene.2025.15353681535368CirclizePlus: using ggplot2 feature to write readable R code for circular visualizationZheyu ZhangTianze CaoYuexia HuangYu XiaIn the R programming language, the de facto standard framework for drawing rectangular coordinates is ggplot2. The most important feature of ggplot2 is that it is object-oriented and uses the plus sign to overlay various objects. In the field of circular visualization, circlize is a popular software, but it is based on procedural programming. Making it object-oriented can make the logic of the written code clearer and improve the reusability of the code. In this work, we introduce circlizePlus, which redesigns the concepts in circular visualization into several R S4 classes. It also defines a set of additional rules, based on which users can implement ggplot2-like drawing techniques. circlizePlus is a wrapper for circlize. It transforms the procedural programming style of circular visualization drawing into object-oriented programming. The additional rules it defines reduce the amount of coding and make the code more readable. The source codes can be found at https://github.com/tianzelab/circlizePlus, and the sample code can be found at https://tianzelab.github.io/circlizePlusBook/.https://www.frontiersin.org/articles/10.3389/fgene.2025.1535368/fullcirclizeggplot2object-orientedgeneric functionsfunctional programming
spellingShingle Zheyu Zhang
Tianze Cao
Yuexia Huang
Yu Xia
CirclizePlus: using ggplot2 feature to write readable R code for circular visualization
Frontiers in Genetics
circlize
ggplot2
object-oriented
generic functions
functional programming
title CirclizePlus: using ggplot2 feature to write readable R code for circular visualization
title_full CirclizePlus: using ggplot2 feature to write readable R code for circular visualization
title_fullStr CirclizePlus: using ggplot2 feature to write readable R code for circular visualization
title_full_unstemmed CirclizePlus: using ggplot2 feature to write readable R code for circular visualization
title_short CirclizePlus: using ggplot2 feature to write readable R code for circular visualization
title_sort circlizeplus using ggplot2 feature to write readable r code for circular visualization
topic circlize
ggplot2
object-oriented
generic functions
functional programming
url https://www.frontiersin.org/articles/10.3389/fgene.2025.1535368/full
work_keys_str_mv AT zheyuzhang circlizeplususingggplot2featuretowritereadablercodeforcircularvisualization
AT tianzecao circlizeplususingggplot2featuretowritereadablercodeforcircularvisualization
AT yuexiahuang circlizeplususingggplot2featuretowritereadablercodeforcircularvisualization
AT yuxia circlizeplususingggplot2featuretowritereadablercodeforcircularvisualization