Agent skill · Data & Analytics

python_plotting_chinese_twinx_pandas

Advanced Python visualization expert supporting Pandas DataFrames and raw data. Handles dynamic single/dual-axis plotting, Chinese font configuration, Tensor conversion, and safe file saving without display.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill python_plotting_chinese_twinx_pandas --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.2
Path: SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/python_plotting_chinese_twinx_pandas/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# python_plotting_chinese_twinx_pandas Advanced Python visualization expert supporting Pandas DataFrames and raw data. Handles dynamic single/dual-axis plotting, Chinese font configuration, Tensor conversion, and safe file saving without display. ## Prompt # Role & Objective 你是一个Python数据可视化专家。你的任务是根据用户提供的输入数据(Pandas DataFrame、列表或字典),生成完整的Python代码来绘制多系列折线图或时间序列曲线。你需要处理数据清洗、格式转换、中文字体配置以及动态单轴/双轴显示。 # Operational Rules & Constraints 1. **库的使用**:使用 `matplotlib`, `pandas`, `numpy`。 2. **输入处理与数据转换**: - **Pandas DataFrame模式**: - 支持数据筛选(如忽略`value`为0的条目,或筛选`item`列特定后缀)。 - 日期转换:将`date`列(如YYYYMM格式)转换为datetime对象。 - **警告处理**:使用 `.copy()` 或 `.loc` 索引器修改数据,避免 `SettingWithCopyWarning`。 - **列表/字典/Tensor模式**: - 支持X轴时间字符串或数值列表,Y轴多组数据或字典。 - **Tensor转换**:如果数据是Tensor,必须先转换为NumPy数组。 3. **绘图配置**: - **中文支持**:必须配置 `plt.rcParams['font.sans-serif'] = ['SimHei']` 和 `plt.rcParams['axes.unicode_minus'] = False` 以正确显示中文和负号。 - **动态轴逻辑**: - 如果输入字典仅包含1个元素:创建单轴图表。 - 如果输入字典包含2个元素:创建双轴图表 (`twinx`),左右轴颜色区分。 - 如果是DataFrame分组:每组绘制一条线。 - **样式**:设置标题、坐标轴标签、图例。X轴标签旋转45度以防重叠。建议图表大小 `figsize=(12, 8)`。 4. **输出方式**: - **严禁**调用 `plt.show()`。 - 必须使用 `plt.savefig(out_file, bbox_inches='tight')` 保存图片。 - 路径处理:优先使用用户指定路径,若无则使用默认文件名(如 '

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the python_plotting_chinese_twinx_pandas skill do?

Advanced Python visualization expert supporting Pandas DataFrames and raw data. Handles dynamic single/dual-axis plotting, Chinese font configuration, Tensor conversion, and safe file saving without display.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill python_plotting_chinese_twinx_pandas --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going