install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/debug-axes" ~/.claude/skills/majiayu000-claude-skill-registry-debug-axes && rm -rf "$T"
manifest:
skills/data/debug-axes/SKILL.mdsource content
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
orax.get_yscale()
to confirm if the internal setting is actually 'log'.ax.get_ylim()
- 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
ordetermine_yscale
indetermine_xscale
correctly recognizes the data, using debug prints if necessary.gwexpy/plot/defaults.py
- Check if
Correction Guidelines
-
Enforce Scale Application:
- Explicitly call
afterax.set_yscale()
withinsuper().__init__
inPlot.__init__
.gwexpy/plot/plot.py - Always call
after application to force a visual update.ax.autoscale_view()
- 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
logic to ensure a range of approximately 2 orders of magnitude centered around the median.determine_ylim
-
Robust Type Checking:
- Since
checks may fail due to environment differences (import sources), use duck-typing such asisinstance
ortype(obj).__name__
alongside it.hasattr(obj, 'frequencies')
- Since
-
Prevent Duplicate Display in IPython/Jupyter:
- Set
in the_repr_html_ = None
class to prevent duplicate displays (repr andPlot
).plt.show
- Set