Opinions = EvolveModel_mod(InitialOpinion, AgentParameters, InteractionNetwork, total_time, ModelLabel);

Trajectory = nan*ones(total_time,2);

for id_t = 1:total_time
    NewOpinions = Opinions(:,id_t);
    Trajectory(id_t,1) = mean(abs(NewOpinions));
    Trajectory(id_t,2) = mean(NewOpinions);
end

switch id_model
    case 1
        local_lambda = mean(AgentParameters)*(1/max_par_val);
        LineColor = (Color_1*local_lambda) + (Color_2*(1-local_lambda));
    case 2
        local_lambda = mean(AgentParameters)*(1/max_par_val);
        LineColor = (Color_1*local_lambda) + (Color_2*(1-local_lambda));
    case 3
        rad_weight = AgentParameters(:,1); % Radical trait
        stb_weight = AgentParameters(:,2); % Stubborn trait
        con_weight = ones(size(rad_weight)) - rad_weight - stb_weight; % Conformist trait
        LineColor = ([1 0 0]*mean(rad_weight)) + ([0 1 0]*mean(stb_weight)) + ([0 0 1]*mean(con_weight));
    case 4
        local_lambda = mean(AgentParameters);
        LineColor = (Color_1*local_lambda) + (Color_2*(1-local_lambda));
end

plot(Trajectory(:,1), Trajectory(:,2), 'o-', 'LineWidth',4, 'color', LineColor, 'MarkerSize',5), hold on
plot(Trajectory(1,1), Trajectory(1,2), 'o', 'LineWidth',4, 'color', GreenColor, 'MarkerSize',10, 'MarkerEdgeColor',OrangeColor, 'MarkerFaceColor',GreenColor), hold on