Exemplo n.º 1
0
        line, = figure.gca().plot([x, x], 
                                  [y - stdev, y + stdev])
        line.set_solid_capstyle("butt")
        figure.set_style(style, line)


        

if __name__ == "__main__": 
    
    from gizela.pyplot.FigureLayoutBase import FigureLayoutBase
    fig = FigureLayoutBase()

    from gizela.data.PointCartCovMat import PointCartCovMat
    p = PointCartCovMat(id="A", x=0, y=0)
    p.var = (9, 4)

    print p.errEll

    style = {}
    PlotPoint.plot_point_xy(fig, p.x, p.y, style)
    PlotPoint.plot_label_xy(fig, p.id, p.x, p.y, style)
    PlotPoint.plot_error_ellipse_xy(fig, p.x, p.y, p.errEll, style)
    PlotPoint.plot_vector_xy(fig, [p.x, p.x + 3, p.x + 1.0], 
                          [p.y, p.y - 2, p.y - 1.5], style, style)

    fig.gca().axis([-4,4,-4,4])
    fig.set_aspect_equal()
    #fig.show_()
    ori = ("en", "wn", "ne", "nw", "es", "ws", "se", "sw")
    for o in ori:
Exemplo n.º 2
0
    def set_use_apriori(self, use):
        """
        sets use of apriori/aposteriori standard deviation

        use: True/False
        """
        for point in self:
            point.covmat.useApriori=use


if __name__ == "__main__":
    
    # points
    c1 = PointCartCovMat(id="A",x=1,y=2,z=3)
    c1.var = (3,2,3)
    print c1
    c2 = PointCartCovMat(id="B",x=3,y=5,z=6)
    c2.var = (9,9,9)
    c3 = PointCartCovMat(id="C",x=2,y=4)
    c4 = PointCartCovMat(id="D",z=6)

    # covariance matrix
    covmat = CovMat(9,8)
    for i in xrange(9,0,-1): 
        for j in xrange(i): covmat.append_value((j+10.0-i)*1e-5)
    print covmat.data
    
    # point list
    pd=PointListCovMat()
    print pd