Repository navigation
Phase 5d: 箱ひげ図・バイオリン図・ヒートマップと、任意の式の近似曲線(scipy) - #9
Merged
Merged
Conversation
…rd the decisions Split the original 5d into 5d (G8, G10) and 5e (G9 subplots). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rser (Phase 5d, G10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…code (Phase 5d, G8) Regroup the per-type rule constants (XY_TYPES, BOX_TYPES, COLOR_COLUMN_TYPES, ...) and mirror them in js/chart-types.js with a parity test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and generated code (Phase 5d, G10) scipy is imported by the generated code only when a custom fit is used, and is loaded in the browser on demand (ensureScipy). Pin scipy 1.18.0 (the Pyodide 314.0.3 version) as a dev dependency for the unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rrors Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 5d, G10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…NTS.md and README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its and scipy's first load Co-Authored-By: Claude Opus 5.5 <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.
要件定義書9章の Phase 5 のうち、5d(G8 グラフの種類 第2弾、G10 任意関数のフィッティング)を実装しました。G9(サブプロット)は、オーナーの決定で次の 5e に分けました(下記)。
変更内容
グラフの種類 第2弾(G8)
js/chart-types.jsとsettings.pyの定数に持ち、両方が一致することを単体テストで確かめる。種類の規則の定数を整理した(BAR_LIKE_TYPESをやめ、XY_TYPES/BOX_TYPES/COLOR_COLUMN_TYPESなどにした。既存の種類の動きは同じ)。任意関数のフィッティング(G10)
xとパラメータa〜eで書く(例:a*exp(-b*x) + c)。使える関数はabs sqrt exp log log10 sin cos tan。式で使ったパラメータの初期値の欄だけが出る(既定は 1)。expr.py)に「近似の式」の入口を足して解釈する(evalなどは使わない)。誤りは「5文字目: …」のように位置付きの日本語のエラー。curve_fitで当てはめる。利用者が書いた式の文字列は、comment_text()を通してコメントにだけ入る。<html data-scipy-state>に出す。from scipy.optimize import curve_fitも、任意の式があるときだけ書く。編集モードでは、コードが scipy を import していれば実行前に読み込む。scipy==1.18.0を足した(実行時には使わない)。そのほか
plot.box/plot.violin、fits[].model: "custom"/expr/initial)。既定の設定で生成するコードは、Phase 4 と1文字も変わらない。figure_summaryにboxes/violins/meshesを足した(既存のキーの値は変えていない)。pyscript.tomlの変更なし)。計測値(
docs/PERFORMANCE.md「Phase 5d 後」)オーナーが決めたこと(2026-11-12。AGENTS.md §13.4、要件定義書 §2.5 に記録)
xとa〜e、初期値の既定は 1。開発用の依存に scipy を足す。実装の段階で決めたこと(設計書 §7 と AGENTS.md に記録):
テスト
uv run pytest)uv run pytest tests/e2e、20 分 9 秒)test_codegen_compat.py)で確認した注意点
🤖 Generated with Claude Code