I have written a script which modifies the image in the real time by changing sliders values. The problem I am having is related to the distance of the last slider to the viewing window (check picture). This distance wasting space and I would like to remove it. I don't have any extra code for the space between those two elements and wondering how to get rid of it. Here is the code for the sliders.
cv2.namedWindow('Volume')
cv2.namedWindow('Volume', cv2.WINDOW_NORMAL)
cv2.resizeWindow('Volume', win_size, win_size)
cv2.createTrackbar('Axis', 'Volume', 0, 2, nothing)
cv2.createTrackbar('Lower limit', 'Volume', 0, x, nothing)
cv2.createTrackbar('Higer limit', 'Volume', 0, x, nothing)
cv2.createTrackbar('rotaxes', 'Volume', 0, 2, nothing)
cv2.createTrackbar('angle', 'Volume', 0, 360, nothing)
axis = cv2.getTrackbarPos('Axis', 'Volume')
limit_low = cv2.getTrackbarPos('Lower limit', 'Volume')
limit_high = cv2.getTrackbarPos('Higer limit', 'Volume')
rotaxes = cv2.getTrackbarPos('rotaxes', 'Volume')
angle = cv2.getTrackbarPos('angle', 'Volume')
value_matrix_old = [axis, limit_low, limit_high, angle]
And the image of the window: