Sexual_Continuous_Replicator.py
def triplot(sol,col):
    """
    Mapping the phase space into the triangl plain
    C1+C2, DF1+DF2, DM1+DM2
    """
    TP=np.array([1/2,np.sqrt(3)/2])#C
    LS=np.array([0,0])#D_M
    RS=np.array([1,0])#D_F
    orbX=(sol[:,0]+sol[:,3])*TP[0]+(sol[:,1]+sol[:,4])*LS[0]+(sol[:,2]+sol[:,5])*RS[0]
    orbY=(sol[:,0]+sol[:,3])*TP[1]+(sol[:,1]+sol[:,4])*LS[1]+(sol[:,2]+sol[:,5])*RS[1]
    #plot the dynamics
    plt.xlim(-0.2,1.2)
    plt.ylim(-0.1,1.2*TP[1])
    plt.plot([LS[0],TP[0]],[LS[1],TP[1]],linewidth=4,color="k")
    plt.plot([RS[0],TP[0]],[RS[1],TP[1]],linewidth=4,color="k")
    plt.plot([RS[0],LS[0]],[RS[1],LS[1]],linewidth=4,color="k")
    plt.text(-0.35,0,'$D_1^M+D_2^M$',fontsize=20,)
    plt.text(1.05,0,'$D_1^F+D_2^F$',fontsize=20,)
    plt.text(0.365,0.9,'$C_1+C_2$',fontsize=20,)
    plt.plot(orbX,orbY,linewidth=2,color=col)
    plt.tick_params(labelbottom='off',labelleft="off")

    Mapping the phase space into the triangl plain
    C1+C2, DF1+DF2, DM1+DM2
    
Mapping the phase space into the triangl plain
C1+C2, DF1+DF2, DM1+DM2
Mapping the phase space into the triangl plain C1 + C2 DF1 + DF2 DM1 + DM2
def triplot(sol,col):
    TP=np.array([1/2,np.sqrt(3)/2])
    LS=np.array([0,0])
    RS=np.array([1,0])
    orbX=(sol[:,0]+sol[:,3])*TP[0]+(sol[:,1]+sol[:,4])*LS[0]+(sol[:,2]+sol[:,5])*RS[0]
    orbY=(sol[:,0]+sol[:,3])*TP[1]+(sol[:,1]+sol[:,4])*LS[1]+(sol[:,2]+sol[:,5])*RS[1]
    plt.xlim(-0.2,1.2)
    plt.ylim(-0.1,1.2*TP[1])
    plt.plot([LS[0],TP[0]],[LS[1],TP[1]],linewidth=4,color="k")
    plt.plot([RS[0],TP[0]],[RS[1],TP[1]],linewidth=4,color="k")
    plt.plot([RS[0],LS[0]],[RS[1],LS[1]],linewidth=4,color="k")
    plt.text(-0.35,0,'$D_1^M+D_2^M$',fontsize=20,)
    plt.text(1.05,0,'$D_1^F+D_2^F$',fontsize=20,)
    plt.text(0.365,0.9,'$C_1+C_2$',fontsize=20,)
    plt.plot(orbX,orbY,linewidth=2,color=col)
    plt.tick_params(labelbottom='off',labelleft="off")
def triplot ( sol , col ) : TP = np . array ( [ 1 / 2 , np . sqrt ( 3 ) / 2 ] ) LS = np . array ( [ 0 , 0 ] ) RS = np . array ( [ 1 , 0 ] ) orbX = ( sol [ : , 0 ] + sol [ : , 3 ] ) * TP [ 0 ] + ( sol [ : , 1 ] + sol [ : , 4 ] ) * LS [ 0 ] + ( sol [ : , 2 ] + sol [ : , 5 ] ) * RS [ 0 ] orbY = ( sol [ : , 0 ] + sol [ : , 3 ] ) * TP [ 1 ] + ( sol [ : , 1 ] + sol [ : , 4 ] ) * LS [ 1 ] + ( sol [ : , 2 ] + sol [ : , 5 ] ) * RS [ 1 ] plt . xlim ( - 0.2 , 1.2 ) plt . ylim ( - 0.1 , 1.2 * TP [ 1 ] ) plt . plot ( [ LS [ 0 ] , TP [ 0 ] ] , [ LS [ 1 ] , TP [ 1 ] ] , linewidth = 4 , color = "k" ) plt . plot ( [ RS [ 0 ] , TP [ 0 ] ] , [ RS [ 1 ] , TP [ 1 ] ] , linewidth = 4 , color = "k" ) plt . plot ( [ RS [ 0 ] , LS [ 0 ] ] , [ RS [ 1 ] , LS [ 1 ] ] , linewidth = 4 , color = "k" ) plt . text ( - 0.35 , 0 , '$D_1^M+D_2^M$' , fontsize = 20 , ) plt . text ( 1.05 , 0 , '$D_1^F+D_2^F$' , fontsize = 20 , ) plt . text ( 0.365 , 0.9 , '$C_1+C_2$' , fontsize = 20 , ) plt . plot ( orbX , orbY , linewidth = 2 , color = col ) plt . tick_params ( labelbottom = 'off' , labelleft = "off" )
Mapping the phase space into the triangl plain
C1+C2, DF1+DF2, DM1+DM2
Mapping the phase space into the triangl plain C1 + C2 DF1 + DF2 DM1 + DM2
"""
    Mapping the phase space into the triangl plain
    C1+C2, DF1+DF2, DM1+DM2
    """ #C #D_M #D_F #plot the dynamics
sol
col