Min Seung Hyun, Zhou Jiawei
School of Ophthalmology and Optometry, Affiliated Eye Hospital, State Key Laboratory of Ophthalmology, Optometry and Vision Science, Wenzhou Medical University, Wenzhou, China.
Front Genet. 2021 Dec 15;12:802894. doi: 10.3389/fgene.2021.802894. eCollection 2021.
R, a programming language, is an attractive tool for data visualization because it is free and open source. However, learning R can be intimidating and cumbersome for many. In this report, we introduce an R package called "smplot" for easy and elegant data visualization. The R package "smplot" generates graphs with defaults that are visually pleasing and informative. Although it requires basic knowledge of R and ggplot2, it significantly simplifies the process of plotting a bar graph, a violin plot, a correlation plot, a slope chart, a Bland-Altman plot and a raincloud plot. The aesthetics of the plots generated from the package are elegant, highly customisable and adhere to important practices of data visualization. The functions from smplot can be used in a modular fashion, thereby allowing the user to further customise the aesthetics. The package is open source under the MIT license and available on Github (https://github.com/smin95/smplot), where updates will be posted. All the example figures in this report are reproducible and the codes and data are provided for the reader in a separate online guide (https://smin95.github.io/dataviz/).
R 是一种编程语言,因其免费和开源的特性,成为数据可视化的一个有吸引力的工具。然而,对许多人来说,学习 R 可能会令人生畏且繁琐。在本报告中,我们介绍了一个名为“smplot”的 R 包,用于轻松且美观地进行数据可视化。R 包“smplot”生成的图形具有默认设置,既美观又信息丰富。尽管它需要具备 R 和 ggplot2 的基础知识,但它显著简化了绘制柱状图、小提琴图、相关性图、斜率图、布兰德 - 奥特曼图和雨云图的过程。该包生成的图形美观、高度可定制且遵循数据可视化的重要规范。smplot 的函数可以以模块化方式使用,从而允许用户进一步定制美观性。该包在 MIT 许可下开源,可在 Github(https://github.com/smin95/smplot)上获取,更新内容将发布在该网站。本报告中的所有示例图形都是可重现的,代码和数据在单独的在线指南(https://smin95.github.io/dataviz/)中提供给读者。