AGENTS
Rules
Plotting
Python Plotting (matplotlib / seaborn) for publication ready figures.
- Use English-only text in all figures. Do not use Chinese characters (matplotlib may lack the required CJK fonts).
- After plotting, remove spines with sns.despine() (apply per-axes or globally, as appropriate).
- Keep figure size compact for papers (prefer single-column layouts; aim ~2–3.5 inches wide unless a two-column figure is required).
- No gridlines on backgrounds (disable with plt.grid(False) or ax.grid(False)).
- Apply the following style preset at the start of your plotting code to unify fonts and export settings:
1 | plt.rcParams["font.family"] = "Arial" # or use "Liberation Sans" for ubuntu |
Notes
- Ensure sns.despine() is called after axes are created.
- When exporting for manuscripts, prefer vector formats (PDF/EPS) with the above font settings to preserve text quality.
Python Project Management
Python projects could be managed by uv. Check before you run pip or uv commands.
Natural Language
Always write code, docs, and code comments in English, but respond in 中文
Reading files
Use commands like head to decide whether you truly need to load the entire dataset file (e.g., CSV, JSON files).
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 TeaPort!




