修复运行时断链 + 字号/间距联动重写 - #1
Open
chendengji wants to merge 2 commits into
Open
Conversation
运行时断链(实测修复): - boxplot/eventplot: labels= 被 mpl 3.9+ 移除 → tick_labels / 手动设刻度 - hexbin/hist2d: 从 paired 重分到 xy_series(原预处理把 x 转 str 致崩) - triplot: 不再把 z 当 triangles 传入 ax.triplot - scatter3d/gridded/irregular: 预处理改 dropna(subset=) 避免 x/z 同列名返回重名列 DataFrame - ieeetran: 从 AVAILABLE_STYLES 移除(scienceplots 无此样式, 调用抛 OSError) - 导入: 改双模式 + 新增 src/__init__.py, 修 CLI sci_plot.py 导入顺序与 --columns 列名映射 字号/间距(核心): - plot_chart 不再覆盖样式自带 figsize(nature 原为 3.3x2.5+7pt 被强制改成 5x4 致大图小字) - 新增 _apply_typography: figsize 自定义时字号按比例联动, fontsize 作主控钮 - 新增 kwargs: figsize/fontsize/constrained_layout(2D 默认 True)/legend_loc/legend_frame(默认 False) - 3D 因 constrained 支持有限自动回退 tight_layout 文档修正: - SKILL.md/README/environment.yml: env 名 geo(非 geo3.13), 图表名 line/scatter(非 xy_line) - README 删除不存在的 cell/plos/elsevier/springer/aps/jgr 等样式, 修正 plot_chart 签名与图表计数(37) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
代码层: - _apply_typography 扩展为统一缩放: 字号/数据线宽/轴宽/刻度按同比例同步放大 (figsize 或 fontsize 给定时), 避免大图小字细线失衡 - 新增 DEFAULT_CMAP='viridis' (感知均匀+色盲友好), 场数据图全部改读 cmap kwarg (contourf/imshow/pcolormesh/hexbin/hist2d/scatter3d/surface3d/trisurf3d/tricontourf/tripcolor) - 新增 despine: 2D 折线/柱/散点/统计类默认去顶右轴线(SCI 干净风格), 场数据图/3D 默认保留四框; despine= kwarg 可覆盖 - 新增 linewidth/cmap/despine kwargs; line.py 线宽改跟随样式+kwarg - contour/tricontour 等高线标号去掉写死 fontsize=8, 改跟随 font.size 缩放 文档层: - SKILL.md 「字号与间距约定」扩为「样式与美化规定」9 小节: 样式选择/统一缩放/配色/线宽刻度/图例/布局轴线/SCI 美化原则/kwargs 总表/LLM 自主性 - README 样式表补统一缩放/cmap/despine 说明, 指向 SKILL.md 回归: 全 37 图表 × 4 样式 + cmap/despine/统一缩放专项通过 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动概要
运行时断链修复(全 37 图表 × 4 样式 × 三种调用方式实测通过)
boxplot/eventplot崩labels=mpl 3.9+ 移除 →tick_labels/ 手动设刻度hexbin/hist2d崩triplot崩triangles传入scatter3d/gridded/irregular 边界dropna(subset=)避免重名列 DataFrameieeetran样式崩from src.sci_plot_api import崩src/__init__.pysci_plot.py--columns x=映射到x_col字号/间距(核心)
plot_chart不再覆盖样式自带 figsize(旧代码强制 (5,4) + 7pt → 大图小字)_apply_typography:传figsize=时字号按比例联动;fontsize=作主控钮figsize / fontsize / constrained_layout(2D 默认 True) / legend_loc / legend_frame(默认 False)文档
geo(非 geo3.13)、图表名line/scatter(非 xy_line)plot_chart签名与图表计数(37)🤖 Generated with Claude Code