INNER CODE UNIT · Python

color

F-R-L/forge-film · forge/webui/app.py:55

        color = plt.cm.RdYlGn(1.0 - (s.complexity - 1) / 9.0)
        circle = plt.Circle((x, y_pos), 0.35, color=color, zorder=3)
        ax.add_patch(circle)
        ax.text(x, y_pos, s.id, ha="center", va="center", fontsize=8, fontweight="bold", zorder=4)
        ax.text(x, y_pos - 0.6, f"c={s.complexity}", ha="center", va="center", fontsize=7, color="#333")

    legend = [
        mpatches.Patch(color=plt.cm.RdYlGn(0.9), label="Low complexity"),
        mpatches.Patch(color=plt.cm.RdYlGn(0.5), label="Medium"),
        mpatches.Patch(color=plt.cm.RdYlGn(0.1), label="High complexity"),
    ]
    ax.legend(handles=legend, loc="upper right", fontsize=7)
    fig.tight_layout()
    return fig


async def _run_pipeline(
    story: str,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…