Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

data-visualization

БесплатноЗапускает вложенные скриптыНе проверен

Best practices for creating clear, accurate scientific visualizations with matplotlib, seaborn, and other Python plotting libraries. Covers common pitfalls…

Delphine-Lот Delphine-L★ 23 звезды на GitHub

Об этом скилле

Data Visualization Best Practices

Expert guidance for creating publication-quality scientific visualizations, avoiding common pitfalls, and optimizing figure clarity.

When to Use This Skill

  • Creating figures for scientific publications
  • Debugging misleading or distorted visualizations
  • Optimizing figure layouts and element sizes
  • Choosing appropriate plot types for data characteristics
  • Ensuring statistical annotations fit properly
  • Generating images for sharing with Claude or other AI tools

Supporting Files

This skill is organized into focused reference files. Load them as needed:

  • pitfalls-and-troubleshooting.md - Log-scale distortion, coordinate transform bugs, outlier handling philosophy, axis range optimization, float year labels
  • chart-recipes.md - Code recipes for temporal trends, boxplots, scatter plots, category proportions, stacked area charts, sample size legends, the dual-approach for outlier handling in publication figures
  • color-palettes.md - Okabe-Ito palette, Paul Tol palette, sequential/diverging schemes, colorblind-safe implementation in matplotlib/seaborn
  • claude-image-constraints.md - Claude API 8000px limit, safe figure size presets, resize helpers, Jupyter notebook oversized image fixes
  • figure-descriptions.md - Templates for writing publication-quality figure descriptions with proper statistical reporting
  • itol-reference.md - iTOL dataset formats (DATASET_STYLE, DATASET_BINARY, DATASET_COLORSTRIP), species name synchronization, troubleshooting
  • journal-requirements.md - Journal-specific figure specs (Nature, Science, Cell, PLOS, ACS, IEEE, Elsevier, BMC): dimensions, DPI, formats, panel labeling, file naming

Assets (importable in notebooks/scripts)

  • assets/publication.mplstyle - General publication style: plt.style.use('path/to/publication.mplstyle')
  • assets/nature.mplstyle - Nature journal style (89mm single column, 7pt fonts, 600 DPI)
  • assets/presentation.mplstyle - Larger fonts/lines for posters and slides
  • assets/color_palettes.py - Importable palette definitions (Okabe-Ito, Wong, Paul Tol), apply_palette() helper, DNA base colors

Scripts (helper utilities)

  • scripts/figure_export.py - save_publication_figure(), save_for_journal(), check_figure_size() - export in multiple formats with journal-specific DPI/format settings
  • scripts/style_presets.py - apply_publication_style(), configure_for_journal(), set_color_palette() - one-command journal configuration

Core Principles

1. Always Check Log-Scale Plots

KDE-based plots (violin, ridge) on log axes produce distorted shapes. Use boxplots or log-transform data first, then plot on linear axes. See pitfalls-and-troubleshooting.md for details.

2. Show All Data First, Filter Later

Default to showing ALL data points in initial visualizations (showfliers=True). Outliers may be biologically meaningful. Only filter after review with domain expert, and always document exclusions.

3. Use Colorblind-Safe Palettes

Use Okabe-Ito palette (recommended by Nature) for categorical data. Combine color with marker shapes for redundancy. Never use red-green combinations. See color-palettes.md for hex codes and implementation.

4. Respect Claude's Image Size Limit

Images shared with Claude must not exceed 8000 pixels in either dimension. Use safe figure size presets and the save_figure() helper. See claude-image-constraints.md.

5. Check for Saturated Metrics Before Boxplotting

If most values of a bounded metric are identical, IQR = 0 and every box renders as a flat line — the panel looks like missing data when coverage is complete. Guard with modal_frac > 0.5 or iqr == 0, then plot the per-group proportion as bars instead. See pitfalls-and-troubleshooting.md.

6. Position Annotations Carefully

Use pure data coordinates or ax.transAxes (0-1 range) for text positioning. Never mix coordinate systems (e.g., ax.get_xaxis_transform() with data-scale y-values). See pitfalls-and-troubleshooting.md.

Chart Selection Quick Guide

Data Type Recommended Chart When to Use
Distribution comparison Boxplot Large datasets, log scales, multiple groups
Distribution shape Histogram Always works on log scales, shows true frequency
Temporal trends (few points) Scatter + regression < 50 points per timepoint, continuous time
Temporal trends (many points) Boxplots by year Overlapping points, discrete timepoints
Category proportions over time Stacked area + stacked bar (dual panel) Showi
Полный SKILL.md на GitHub

Установить data-visualization в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Glob
Bash

Вложенные файлы

assets/color_palettes.pyassets/nature.mplstyleassets/presentation.mplstyleassets/publication.mplstylechart-recipes.mdclaude-image-constraints.mdcolor-palettes.mdfigure-descriptions.mditol-reference.mdjournal_requirements.mdpitfalls-and-troubleshooting.mdscripts/figure_export.pyscripts/style_presets.py

FAQ

Что делает скилл data-visualization?

Best practices for creating clear, accurate scientific visualizations with matplotlib, seaborn, and other Python plotting libraries. Covers common pitfalls, optimization techniques, publication-quality figure generation, and Claude API image size constraints.

Как установить скилл data-visualization?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл data-visualization запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить data-visualization с