I want to use add_dock_widget to display the matplotlib figure, but the margin is too big. How can I specify the size in add_dock_widget?
view1 = napari.view_image(image)
with plt.style.context('dark_background'):
canvas = FigureCanvas(Figure(figsize=(5, 15)))
axes1 = canvas.figure.add_subplot(3, 1, 1)
axes1.imshow(np.zeros((100, 100), np.uint8))
axis2 = canvas.figure.add_subplot(3, 1, 2)
axis2.imshow(np.zeros((100, 100), np.uint8))
axis3 = canvas.figure.add_subplot(3, 1, 3)
axis3.imshow(np.zeros((100, 100), np.uint8))
canvas.figure.subplots_adjust(left=0, bottom=0.1, right=1, top=0.95, wspace=0, hspace=0.4)
view1.window.add_dock_widget(canvas, area='right')