36 山脊图

36 山脊图

用途

多组分布沿纵轴层层叠放,横向比较分布位置与形状。

示例(5 张)

36-1 各月负荷分布的山脊图

各月负荷分布的山脊图

36-2 各馈线电流分布的山脊图

各馈线电流分布的山脊图

36-3 各季节风电出力分布的山脊图

各季节风电出力分布的山脊图

36-4 各节点谐波幅值分布的山脊图

各节点谐波幅值分布的山脊图

36-5 四种方案线损率分布的山脊图

四种方案线损率分布的山脊图

代码

以下 5 个函数取自 code/第六批_组合图261107.py,直接调用即可出图。样式(宋体 + Times、10 磅、刻度朝内四边、留白自检)由 code/公共配置261107.py 的 setup_cn_style() 和 save() 统一提供,本节不再重复。

# 摘自 code/第六批_组合图261107.py

def rg_01():
    """各月负荷分布的山脊图。"""
    fig, ax = new_fig(left=0.19, bottom=0.19)
    rng = np.random.default_rng(3601)
    months = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]
    xx = np.linspace(200, 900, 200)
    for i, m in enumerate(months):
        mu = 520 + 90 * np.cos((i - 6) / 12 * 2 * np.pi)
        yy = np.exp(-((xx - mu) / 95) ** 2)
        yy = yy / yy.max() * 0.85
        ax.fill_between(xx, i, i + yy, color=C5, alpha=0.85, linewidth=0.5,
                        edgecolor="0.35")
        ax.plot(xx, i + yy, color=C1, lw=0.5)
    ax.set_yticks(range(len(months)))
    ax.set_yticklabels(months)
    ax.set_ylim(-0.4, len(months) + 0.7)
    ax.set_xlabel("有功负荷 " + IT["P"] + " / kW")
    ax.set_ylabel("月份")
    save(fig, "36_山脊图", "36_山脊图_各月负荷分布")

def rg_02():
    """各馈线电流分布的山脊图。"""
    fig, ax = new_fig(left=0.19, bottom=0.19)
    xx = np.linspace(0, 600, 200)
    params = [(280, 60), (340, 75), (210, 45), (420, 88), (310, 66)]
    for i, (mu, sd) in enumerate(params):
        yy = np.exp(-((xx - mu) / sd) ** 2)
        yy = yy / yy.max() * 0.85
        ax.fill_between(xx, i, i + yy, color=PALETTE5[i], alpha=0.8,
                        linewidth=0.5, edgecolor="0.35")
    ax.set_yticks(range(5))
    ax.set_yticklabels([f"L{i + 1}" for i in range(5)])
    ax.set_ylim(-0.4, 5.5)
    ax.set_xlabel("电流有效值 " + IT["I"] + " / A")
    ax.set_ylabel("馈线")
    save(fig, "36_山脊图", "36_山脊图_各馈线电流分布")

def rg_03():
    """各季节风电出力分布的山脊图。"""
    fig, ax = new_fig(left=0.19, bottom=0.19)
    xx = np.linspace(0, 1100, 200)
    params = [(620, 180), (420, 150), (540, 170), (760, 200)]
    for i, (mu, sd) in enumerate(params):
        yy = np.exp(-((xx - mu) / sd) ** 2)
        yy = yy / yy.max() * 0.85
        ax.fill_between(xx, i, i + yy, color=COLORS[i], alpha=0.8,
                        linewidth=0.5, edgecolor="0.35")
    ax.set_yticks(range(4))
    ax.set_yticklabels(["春季", "夏季", "秋季", "冬季"])
    ax.set_ylim(-0.4, 4.5)
    ax.set_xlabel("风电出力 " + IT["P"] + " / kW")
    ax.set_ylabel("季节")
    save(fig, "36_山脊图", "36_山脊图_各季节风电出力")

def rg_04():
    """各节点谐波幅值分布的山脊图。"""
    fig, ax = new_fig(left=0.19, bottom=0.19)
    xx = np.linspace(0, 46, 200)
    params = [(12, 5), (18, 7), (9, 4), (26, 9), (21, 8), (15, 6)]
    for i, (mu, sd) in enumerate(params):
        yy = np.exp(-((xx - mu) / sd) ** 2)
        yy = yy / yy.max() * 0.85
        ax.fill_between(xx, i, i + yy, color=C5, alpha=0.85, linewidth=0.5,
                        edgecolor="0.35")
    ax.set_yticks(range(6))
    ax.set_yticklabels([f"N{i + 1}" for i in range(6)])
    ax.set_ylim(-0.4, 6.5)
    ax.set_xlabel("5 次谐波电流 " + IT["I"] + SUB["h"] + " / A")
    ax.set_ylabel("节点")
    save(fig, "36_山脊图", "36_山脊图_各节点谐波分布")

def rg_05():
    """四种方案线损率分布的山脊图。"""
    fig, ax = new_fig(left=0.21, bottom=0.19)
    xx = np.linspace(1.5, 5.5, 200)
    params = [(4.62, 0.30), (3.71, 0.26), (3.24, 0.22), (2.86, 0.19)]
    names = ["原状", "方案一", "方案二", "方案三"]
    for i, (mu, sd) in enumerate(params):
        yy = np.exp(-((xx - mu) / sd) ** 2)
        yy = yy / yy.max() * 0.85
        ax.fill_between(xx, i, i + yy, color=PALETTE4[i], alpha=0.82,
                        linewidth=0.5, edgecolor="0.35")
    ax.set_yticks(range(4))
    ax.set_yticklabels(names)
    ax.set_ylim(-0.4, 4.5)
    ax.set_xlabel("年线损率 / %")
    ax.set_ylabel("方案")
    save(fig, "36_山脊图", "36_山脊图_各方案线损率")

说明

  • 图片尺寸 1181×944 px(100 mm × 80 mm @ 300 dpi),三维图为 1181×1122 px。
  • 图内不放标题,图题由本文件的二级/三级标题承担。
  • 数据为贴近广东实际量级的仿真算例,随机种子固定,重跑结果一致。
posted @ 2026-11-08 00:11  小青蛙电气  阅读(3)  评论(0)    收藏  举报