plot_functions.py
def draw_rectangle(ax, x_min_anchors, y_min_anchors, width, height, cnt):
    """
    Draw the rectangle upon the graphics
    """
    if y_min_anchors != -10:#y_min-4:
        ax.plot([x_min_anchors, x_min_anchors + width], [y_min_anchors, y_min_anchors],'r-', color='grey', label='anchor border') if cnt == 1 else ax.plot([x_min_anchors, x_min_anchors + width], [y_min_anchors, y_min_anchors],'r-', color='grey')
        ax.plot([x_min_anchors + width, x_min_anchors], [y_min_anchors + height, y_min_anchors + height], 'y-', color='grey')
    else:
        ax.plot([x_min_anchors, x_min_anchors + width], [y_min_anchors, y_min_anchors],'r-', linestyle='dashed', color='grey', label='anchor border') if cnt == 1 else ax.plot([x_min_anchors, x_min_anchors + width], [y_min_anchors, y_min_anchors],'r-', color='grey')
        ax.plot([x_min_anchors + width, x_min_anchors], [y_min_anchors + height, y_min_anchors + height], 'y-', linestyle='dashed', color='grey')
    if x_min_anchors != -10:#x_min-4 :
        ax.plot([x_min_anchors, x_min_anchors], [y_min_anchors, y_min_anchors + height], 'g-', color='grey')
        ax.plot([x_min_anchors + width, x_min_anchors + width], [y_min_anchors, y_min_anchors + height], 'b-', color='grey')
    else:
        ax.plot([x_min_anchors, x_min_anchors], [y_min_anchors, y_min_anchors + height], 'g-', linestyle='dashed', color='grey')
        ax.plot([x_min_anchors + width, x_min_anchors + width], [y_min_anchors, y_min_anchors + height], 'b-', linestyle='dashed', color='grey')

    Draw the rectangle upon the graphics
    
Draw the rectangle upon the graphics
Draw the rectangle upon the graphics
def draw_rectangle(ax, x_min_anchors, y_min_anchors, width, height, cnt):
    if y_min_anchors != -10:
        ax.plot([x_min_anchors, x_min_anchors + width], [y_min_anchors, y_min_anchors],'r-', color='grey', label='anchor border') if cnt == 1 else ax.plot([x_min_anchors, x_min_anchors + width], [y_min_anchors, y_min_anchors],'r-', color='grey')
        ax.plot([x_min_anchors + width, x_min_anchors], [y_min_anchors + height, y_min_anchors + height], 'y-', color='grey')
    else:
        ax.plot([x_min_anchors, x_min_anchors + width], [y_min_anchors, y_min_anchors],'r-', linestyle='dashed', color='grey', label='anchor border') if cnt == 1 else ax.plot([x_min_anchors, x_min_anchors + width], [y_min_anchors, y_min_anchors],'r-', color='grey')
        ax.plot([x_min_anchors + width, x_min_anchors], [y_min_anchors + height, y_min_anchors + height], 'y-', linestyle='dashed', color='grey')
    if x_min_anchors != -10:
        ax.plot([x_min_anchors, x_min_anchors], [y_min_anchors, y_min_anchors + height], 'g-', color='grey')
        ax.plot([x_min_anchors + width, x_min_anchors + width], [y_min_anchors, y_min_anchors + height], 'b-', color='grey')
    else:
        ax.plot([x_min_anchors, x_min_anchors], [y_min_anchors, y_min_anchors + height], 'g-', linestyle='dashed', color='grey')
        ax.plot([x_min_anchors + width, x_min_anchors + width], [y_min_anchors, y_min_anchors + height], 'b-', linestyle='dashed', color='grey')
def draw_rectangle ( ax , x_min_anchors , y_min_anchors , width , height , cnt ) : if y_min_anchors != - 10 : ax . plot ( [ x_min_anchors , x_min_anchors + width ] , [ y_min_anchors , y_min_anchors ] , 'r-' , color = 'grey' , label = 'anchor border' ) if cnt == 1 else ax . plot ( [ x_min_anchors , x_min_anchors + width ] , [ y_min_anchors , y_min_anchors ] , 'r-' , color = 'grey' ) ax . plot ( [ x_min_anchors + width , x_min_anchors ] , [ y_min_anchors + height , y_min_anchors + height ] , 'y-' , color = 'grey' ) else : ax . plot ( [ x_min_anchors , x_min_anchors + width ] , [ y_min_anchors , y_min_anchors ] , 'r-' , linestyle = 'dashed' , color = 'grey' , label = 'anchor border' ) if cnt == 1 else ax . plot ( [ x_min_anchors , x_min_anchors + width ] , [ y_min_anchors , y_min_anchors ] , 'r-' , color = 'grey' ) ax . plot ( [ x_min_anchors + width , x_min_anchors ] , [ y_min_anchors + height , y_min_anchors + height ] , 'y-' , linestyle = 'dashed' , color = 'grey' ) if x_min_anchors != - 10 : ax . plot ( [ x_min_anchors , x_min_anchors ] , [ y_min_anchors , y_min_anchors + height ] , 'g-' , color = 'grey' ) ax . plot ( [ x_min_anchors + width , x_min_anchors + width ] , [ y_min_anchors , y_min_anchors + height ] , 'b-' , color = 'grey' ) else : ax . plot ( [ x_min_anchors , x_min_anchors ] , [ y_min_anchors , y_min_anchors + height ] , 'g-' , linestyle = 'dashed' , color = 'grey' ) ax . plot ( [ x_min_anchors + width , x_min_anchors + width ] , [ y_min_anchors , y_min_anchors + height ] , 'b-' , linestyle = 'dashed' , color = 'grey' )
Draw the rectangle upon the graphics
Draw the rectangle upon the graphics
"""
    Draw the rectangle upon the graphics
    """ #y_min-4: #x_min-4 :
ax
x_min_anchors
y_min_anchors
width
height
cnt