Academic Figures Generator
Paste the following prompt into your AI chat to install this skill:
Please install @user_481397b5/academic-figures by following the official guide at https://skillhub.cn/install/skillhub.md.
About this skill
Challenges in Academic Figure Preparation
Creating figures for scientific publications often involves meeting strict journal requirements, which can be time-consuming and error-prone. Key issues include:
- Complex Journal Standards: Journals like
NatureandLancetmandate specific dimensions (e.g., 89mm single-column, 183mm double-column), DPI (600+), fonts (Helvetica 7pt, minimum 5pt), and colorblind-safe palettes. Manual adjustment ofmatplotlibcode to comply is inefficient and prone to errors, such as setting column widths or colors incorrectly. - Lack of Data Validation: Invalid data structures can produce flawed outputs, delaying submissions. For example, mismatched series lengths or missing required keys may generate broken charts.
- Accessibility Concerns: Traditional color schemes may not be suitable for colorblind readers, reducing the paper's accessibility and potentially leading to journal rejections.
Core Capabilities and Workflow
This tool addresses these challenges with a single command, offering the following features:
- 14 Chart Types: Covers bar charts (
-t bar), heatmaps (-t heatmap), forest plots (-t forest), KM survival curves (-t km), and more via the-tparameter, suitable for most academic analyses. - 7 Color Schemes: Includes
glm(default, elegant and colorblind-safe) andokabe-ito(Nature Methods gold standard), switchable with--theme. For instance,--theme okabe-itoensures colorblind safety for journal submissions. - Journal Presets: Parameters like
--journal natureor--journal lancetautomatically apply official column widths, fonts, and DPI (e.g., nature double-column at 183mm, 7pt font), eliminating manual configuration. - Data Validation and Verification:
- Pre-run
validate_data()checks data structure (e.g., box/violin labels must match group count), with fatal errors (e.g., empty series) returning exit code 1 without saving. - For PDF output,
--verifyperforms pixel-level overlap checks to prevent label obscuration. - Chinese Language Support:
--cjkauto-detects and loads Chinese fonts (e.g., Noto Sans CJK), recursively scanning data dictionary keys to avoid garbled text in bilingual charts.
Workflow: Users provide a JSON data file and run a command like python gen_figure.py -t bar --theme okabe-ito --journal nature -o figure.pdf. The tool executes data validation, color application, and layout adjustment, outputting a 600 DPI PDF that meets publication standards.
Important Considerations
- Data Format Requirements: Input must be JSON with required keys for the chart type. For example, bar charts need
series(data arrays) andlabels; error bars require theerrorsfield. - Journal Submission Tips: For submissions, use
--theme okabe-itoand PDF output to comply with mainstream journal colorblind safety requirements. Avoidnatureorlancetcolor schemes, as they are not colorblind-safe. - CJK Font Issues: The system must have Chinese fonts installed (e.g., Noto Sans CJK); otherwise, run
setup_env.pyfor automatic detection and cache clearing. Custom fonts can be specified with--cjk-font. - Verification Process: Before delivering PDFs, run
scripts/audit_pdf.pyto check font sizes against journal minimums (e.g., nature 5pt) and usescripts/verify_overlap_pixel.pyto verify no overlaps. - Scope Limits: This tool is focused on academic figure generation and is not suitable for medical illustrations (e.g., SVG) or terminal CLI charts, which require specialized tools. For flowcharts (
-t diagram), avoid white blocks to ensure visibility on white backgrounds.
Use Cases
- A biomedical researcher preparing a Nature paper submission needs to generate bar charts with one command that comply with double-column dimensions, font sizes, and colorblind-safe palettes, ensuring data validation passes before outputting 600 DPI PDF.
- A clinical data analysis team writing a research paper needs to create KM survival curves including Log-rank tests, risk tables, and median survival annotations, using journal presets to meet Lancet formatting requirements.
- An academic institution producing an annual report needs to batch-generate heatmaps and scatter plots with a unified color scheme and verify no label overlaps, ensuring all charts adhere to internal publication standards.
- A research supervisor guiding students through thesis figures requires generating flowcharts to illustrate research designs, with Chinese label support to automatically load fonts and prevent garbled text.
Best For
- Biomedical researcher: Needs to quickly convert experimental data into journal-compliant figures, avoiding manual adjustments of dimensions, fonts, and colors to save time on paper preparation.
- Clinical data analyst: Responsible for generating statistical charts like survival analysis and ROC curves with professional annotations and outputting publication-grade PDFs to support clinical study report writing.
- Academic publishing editor: Reviews author-submitted figures for journal guideline compliance, requiring tools to automatically apply column width and font presets and verify no overlaps to streamline the review process.
- Research team lead: Manages visualization work across multiple projects, needing unified color schemes and format standards to avoid redundant configuration by team members and ensure figure consistency.
Related Skills
Performs project discrimination, classification, and structured extraction on bidding documents, outputting standardized data with support for manual review.
Expert in multi-platform data collection, integration, and interpretation, delivering market research, sentiment monitoring, ROI analysis, and visual reporting for data-driven decision-making.
Aggregates 11 stock selection strategies into a single entry point, supporting single-strategy and multi-strategy combinations with concurrent acceleration and HTML visualization reports.
This skill uses AI to intelligently analyze data features, automatically recommend and generate interactive HTML visualization dashboards, supporting multiple chart types.