Skip to content

ChuanyingFang/Fplot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fplot - FangLab Scientific Plotting System

R/ggplot2-based modular scientific plotting framework with automatic statistical diagnostics.

Overview

Fplot is a publication-ready scientific plotting system designed for plant biology research. It provides 13 chart types with automatic statistical analysis, following the Fv1.4 color and formatting specification.

Chart Types

Code Type Function
A01 Simple bar plot plot_simple_barplot()
A02 Grouped bar plot plot_grouped_barplot()
A03 Stacked bar plot plot_stacked_barplot()
B01 Simple box plot plot_simple_boxplot()
B02 Grouped box plot plot_grouped_boxplot()
B03 Simple violin plot plot_simple_violin()
B04 Grouped violin plot plot_grouped_violin()
C01 Simple line plot plot_simple_lineplot()
D01 Fitted scatter plot plot_fitted_scatter()
D02 Correlation scatter plot plot_cor_scatter()
D03 PCA density plot plot_pca_density()
Z01 IMATE combined heatmap plot_imate()
Z02 Correlation heatmap plot_heatmap()

Quick Start

# 1. Load configuration
setwd("path/to/Fplot")
source("config/global_settings.R", encoding = "UTF-8")
source("scripts/stat_utils.R", encoding = "UTF-8")

# 2. Load plot script
source("scripts/Fplot-B01.R", encoding = "UTF-8")

# 3. Read data and plot
df <- read.csv("datasample/datasample.csv")
plot_simple_boxplot(data = df, x_col = "group", y_col = "value")

Features

  • Automatic statistical diagnostics: Shapiro-Wilk normality → Levene homogeneity → parametric/non-parametric selection
  • Smart significance annotation: 2-3 groups → bracket; ≥4 groups → CLD (Compact Letter Display)
  • Two-way ANOVA support: Interaction effects + simple main effects (A02/B02/B04)
  • Fv1.4 color specification: OE red (#B2182B), CR blue (#2166AC), neutral gray (#999999)
  • Publication-ready output: 300 DPI, PNG/PDF/SVG, Arial font, standardized dimensions

Directory Structure

Fplot/
├── SKILL.md              # Skill definition (for MoLiLi/WorkBuddy)
├── README.md             # This file
├── config/               # Global settings
│   ├── global_settings.R
│   ├── color_palettes.R
│   ├── theme_F.R
│   └── stat_settings.R
├── scripts/              # Plot scripts (latest version only)
│   ├── stat_utils.R
│   ├── Fplot-A01.R ... Fplot-Z02.R
├── datasample/           # Test datasets
├── templates/            # Data format templates
├── docs/                 # Documentation & examples
│   ├── Fplot-go.md
│   └── examples/
└── output/               # Generated at runtime

Requirements

  • R ≥ 4.5.0
  • Packages: ggplot2, dplyr, tidyr, ggsignif, car, rstatix, multcompView, FSA (optional), linkET, psych, aplot, readxl, reshape2, stringr, ggtext

License

MIT License

Citation

If you use Fplot in your research, please cite:

FangLab Fplot: A modular scientific plotting framework for R/ggplot2. (2026)

About

FangLab Scientific Plotting System. R/ggplot2-based modular scientific plotting framework with automatic statistical diagnostics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages