Пример #1
0
            else:
                tmv.plot_vertices(nodes,faces,R[:,a])
            plt.title(str(a))
                      

    # Residual information
    if True:
        plt.figure()
        plt.suptitle('Residual and heuristic')
        plt.subplot(2,2,1);
        plt.title("Bellmen residual 1")
        tmv.plot_vertices(nodes,faces,sol.res1)
        
        plt.subplot(2,2,2);
        plt.title("Bellmen residual 2")
        tmv.plot_vertices(nodes,faces,sol.res2)

        plt.subplot(2,2,3);
        plt.title("Bellmen residual difference")
        tmv.plot_vertices(nodes,faces,sol.res_diff)       

    if False:
            plt.figure()
            plt.title(name)
            for a in xrange(A):
                (x,f) = cdf_points(X[:,a])
                plt.semilogy(x,f)
            plt.legend(range(A),loc='best')
    
    plt.show()
Пример #2
0
def cdf_plot(returns):
    for (name,ret) in returns.items():
        (x,f) = cdf_points(ret)
        plt.plot(x,f,'-',lw=2,label=name)[0]
    plt.legend(returns.keys(),loc='best')
    plt.show()