Zhang Zheyu, Cao Tianze, Huang Yuexia, Xia Yu
School of Mathematics, Hangzhou Normal University, Hangzhou, China.
Front Genet. 2025 Mar 27;16:1535368. doi: 10.3389/fgene.2025.1535368. eCollection 2025.
In the R programming language, the 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/.
在R编程语言中,用于绘制直角坐标系的标准框架是ggplot2。ggplot2最重要的特点是它是面向对象的,并且使用加号来叠加各种对象。在圆形可视化领域,circlize是一款流行的软件,但它基于过程式编程。将其转变为面向对象的方式可以使编写的代码逻辑更清晰,并提高代码的可重用性。在这项工作中,我们引入了circlizePlus,它将圆形可视化中的概念重新设计为几个R S4类。它还定义了一组附加规则,基于这些规则用户可以实现类似ggplot2的绘图技术。circlizePlus是circlize的一个包装器。它将圆形可视化绘图的过程式编程风格转变为面向对象编程。它定义的附加规则减少了编码量并使代码更具可读性。源代码可在https://github.com/tianzelab/circlizePlus上找到,示例代码可在https://tianzelab.github.io/circlizePlusBook/上找到。