CirclizePlus: using ggplot2 feature to write readable R code for circular visualization - Zhang, Zheyu; Cao, Tianze; Huang, Yuexia; Xia, Yu (Frontiers in Genetics, 2025)
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/.