← スキル一覧に戻る

debug-axes
by tatsuki-washimi
gwpy expansions for experiments
⭐ 0🍴 0📅 2026年1月25日
SKILL.md
name: debug_axes description: プロットのスケール(対数軸など)、目盛、表示範囲の不具合を診断し、意図した見た目に修正する
Debug Plot Axes Skill
This skill is for resolving issues where plot axis scales (especially log scales) or display ranges (ylim/xlim) in gwexpy do not appear as intended.
Diagnostic Procedures
-
Verify Internal State:
- Create a reproduction script and output
ax.get_yscale()orax.get_ylim()to confirm if the internal setting is actually 'log'.
- Create a reproduction script and output
-
Identity Visual Linearity Issues:
- If the internal state is 'log' but it visually appears linear, it is often due to the data range being too narrow (e.g., 1.0 vs 2.23).
- Check if ticks are appropriately placed via
ax.get_yticks().
-
Confirm Judgment Logic:
- Check if
determine_yscaleordetermine_xscaleingwexpy/plot/defaults.pycorrectly recognizes the data, using debug prints if necessary.
- Check if
Correction Guidelines
-
Enforce Scale Application:
- Explicitly call
ax.set_yscale()aftersuper().__init__withinPlot.__init__ingwexpy/plot/plot.py. - Always call
ax.autoscale_view()after application to force a visual update.
- Explicitly call
-
Automatic Range Expansion (Log Scale specific):
- If the data range is less than 100x (2 orders of magnitude), log scales often show few ticks, appearing linear.
- Implement or fix
determine_ylimlogic to ensure a range of approximately 2 orders of magnitude centered around the median.
-
Robust Type Checking:
- Since
isinstancechecks may fail due to environment differences (import sources), use duck-typing such astype(obj).__name__orhasattr(obj, 'frequencies')alongside it.
- Since
-
Prevent Duplicate Display in IPython/Jupyter:
- Set
_repr_html_ = Nonein thePlotclass to prevent duplicate displays (repr andplt.show).
- Set
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です