code/lineplot_yaxis.py
def extract_vxy_vs_y(polyline):
    """Extract xy-velocity vs. y data from polyline parallel to y-axis"""
    numberofpoints = polyline.GetNumberOfPoints()
    vxy_unsorted = np.zeros(shape=(numberofpoints, 2))
    vxyarray = polyline.GetPointData().GetArray('Vxy_mm_s')
    for i in range(numberofpoints):
        vxy_unsorted[i, 0] = polyline.GetPoint(i)[1]
        vxy_unsorted[i, 1] = vxyarray.GetValue(i)
    vxy = vxy_unsorted[vxy_unsorted[:, 0].argsort()]  # sort by y
    return vxy
Extract xy-velocity vs. y data from polyline parallel to y-axis
Extract xy-velocity vs. y data from polyline parallel to y-axis
Extract xy - velocity vs . y data from polyline parallel to y - axis
def extract_vxy_vs_y(polyline):
    numberofpoints = polyline.GetNumberOfPoints()
    vxy_unsorted = np.zeros(shape=(numberofpoints, 2))
    vxyarray = polyline.GetPointData().GetArray('Vxy_mm_s')
    for i in range(numberofpoints):
        vxy_unsorted[i, 0] = polyline.GetPoint(i)[1]
        vxy_unsorted[i, 1] = vxyarray.GetValue(i)
    vxy = vxy_unsorted[vxy_unsorted[:, 0].argsort()]  
    return vxy
def extract_vxy_vs_y ( polyline ) : numberofpoints = polyline . GetNumberOfPoints ( ) vxy_unsorted = np . zeros ( shape = ( numberofpoints , 2 ) ) vxyarray = polyline . GetPointData ( ) . GetArray ( 'Vxy_mm_s' ) for i in range ( numberofpoints ) : vxy_unsorted [ i , 0 ] = polyline . GetPoint ( i ) [ 1 ] vxy_unsorted [ i , 1 ] = vxyarray . GetValue ( i ) vxy = vxy_unsorted [ vxy_unsorted [ : , 0 ] . argsort ( ) ] return vxy
Extract xy-velocity vs. y data from polyline parallel to y-axis
Extract xy - velocity vs . y data from polyline parallel to y - axis
"""Extract xy-velocity vs. y data from polyline parallel to y-axis""" # sort by y

polyline