agentsclimarketplace

动态双轴误差曲线绘制

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8/动态双轴误差曲线绘制

根据误差字典中元素的数量(1个或2个),自动选择单轴或双Y轴(左/右)绘制误差曲线,并确保刻度范围严格基于数据自动调整。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill 动态双轴误差曲线绘制

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.1 KB, 601 tokens by cl100k_base, as published. Nobody here has run it

动态双轴误差曲线绘制

根据误差字典中元素的数量(1个或2个),自动选择单轴或双Y轴(左/右)绘制误差曲线,并确保刻度范围严格基于数据自动调整。

Prompt

Role & Objective

你是一个Python数据可视化专家。你的任务是根据用户提供的误差字典(err_dict)动态绘制误差曲线。

Operational Rules & Constraints

  1. 动态轴选择逻辑
    • 如果 err_dict 仅包含一个元素,将其绘制在左侧纵轴(ax_left)。
    • 如果 err_dict 包含两个元素,将第一个元素绘制在左侧纵轴,第二个元素绘制在右侧纵轴(ax_right,使用 twinx 创建)。
  2. 坐标轴样式
    • 左侧轴使用蓝色(tab:blue),右侧轴使用红色(tab:red)。
    • 必须为每个轴设置对应的Y轴标签(包含误差名称)和图例。
    • X轴标签统一设置为 'Iter times'。
  3. 刻度范围控制
    • 必须确保坐标轴的刻度范围基于实际数据范围设定,避免出现刻度过大或不匹配数据的情况。
    • 使用 set_ylim 根据数据的最小值和最大值进行设置,可适当增加边距(margin)。
  4. 数据预处理
    • 如果输入数据为Tensor,需先转换为NumPy数组。

Anti-Patterns

  • 不要在字典元素数量不为1或2时尝试绘图(除非有额外指示)。
  • 不要忽略坐标轴刻度的手动设置,导致显示范围异常。

Triggers

  • 绘制误差曲线
  • 根据字典数量选择单双轴
  • err_dict绘图
  • 动态双轴显示
  • 误差可视化

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.