Q:

Dynamic interaction between Rectangle Selector and a matplotlib figure

I am working on a an interactive program which displays an image and lets the user select a part of this image through a RectangleSelector.  The goal is that the program 

first, displays in real time the minimum value of the three canals in the selected part of the image
save the coordinates of the rectangle when the user is happy with it, in order the program continues

Because my program project is big and covers much more than that, I have split it in several files.  Here are they :

settings.py

import numpy as np

def init():

    global img # image
    global text_sig_red, text_sig_green, text_sig_blue

#    text_sig_red, text_sig_green, text_sig_blue = '', '', ''

    img = np.array([])

functions.py

import numpy as np
import settings

def line_select_callback(eclick, erelease):

#    'eclick and erelease are the press and release events'
    x1, y1 = int(eclick.xdata), int(eclick.ydata) # start position
    x2, y2 = int(erelease.xdata), int(erelease.ydata) # end position

    crop_img = settings.img[x1:x2,y1:y2]
    #print('shape film temoin', np.shape(film_temoin))

    sig_red = np.min(crop_img[:,:,0])
    sig_green = np.min(crop_img[:,:,1])
    sig_blue = np.min(crop_img[:,:,2])

    text_red = 'min red signal' + str(sig_red)
    text_green = 'min green signal' + str(sig_green)
    text_blue = 'min blue signal' + str(sig_blue)

    settings.text_sig_red.set_text(text_red)
    settings.text_sig_green.set_text(text_green)
    settings.text_sig_blue.set_text(text_blue)

def toggle_selector(event):
    if event.key in ['Q', 'q'] and toggle_selector.RS.active:
        toggle_selector. RS.set_active(False)
    if event.key in ['A', 'a'] and not toggle_selector.RS.active:
        toggle_selector. RS.set_active(True)

main.py

import numpy as np
import matplotlib.image as mpim
import matplotlib.animation as animation
import matplotlib.patches as patches
from matplotlib.widgets import RectangleSelector
from matplotlib import pyplot as plt

import functions as fct
import settings

settings.init()

settings.img = mpim.imread('pattern.png')

fig, ax = plt.subplots(1, 1)

ax_red = plt.axes([0.05, 0.5, 0.05, 0.02])
ax_green = plt.axes([0.05, 0.3, 0.05, 0.02])
ax_blue = plt.axes([0.05, 0.1, 0.05, 0.02])

settings.text_sig_red = ax_red.text(0.5,0.5,"",transform=ax_red.transAxes)
settings.text_sig_green = ax_green.text(0.5,0.5,"",transform=ax_green.transAxes)
settings.text_sig_blue = ax_blue.text(0.5,0.5,"",transform=ax_blue.transAxes)

ax.imshow(settings.img)

fct.toggle_selector. RS = RectangleSelector(ax, fct.line_select_callback,
                                           drawtype='box', useblit=True,
                                           button=[1, 3],  # don't use middle button
                                           minspanx=5, minspany=5,
                                           spancoords='pixels',
                                           interactive=True,
                                           rectprops=dict(facecolor='black', 
                                                          edgecolor = 'black',
                                                          alpha=1., 
                                                          fill=None))

plt.connect('key_press_event', fct.toggle_selector)

plt.show()

Currently, I have trouble with the goal (1) of my program.  It doesn't display dynamically the text text_sig_red.  
And actually, I don't know how to save the coordinates of the rectangle when the user is happy with it.  Maybe the user should stop touching the rectangle position and extents and click a button in order the program continue (This is linked to another problem I have)
PS : I have given here the random image I have used in this example for my question. 

A:

Hope your problem was solved by now, but if not:
The root cause of your problem with goal (1) is that the figure never explicitly gets updated after the initial show(). 
So one solution to this problem would be to add the following line to the end of the line_select_callback function in functions.py:
plt.gcf().canvas.draw()

(of course plt would need to be imported in this module as well)
Concerning the rest of your question, creating an obvious interaction such as a button is always a good choice.