getting images to show side by side in matlab
matlab
Solution
You can use `subplot` to span multiple grid squares. For your example try
subplot(1,4,1)
subplot(1,4,2)
subplot(1,4,3:4) % this will expand the third axes over the last two grid squares
Note:
The position of the axes can be `h=subplot(...)` returns the handle to the newly created axes. You can then use `set` to adjust the axes or you can use
h=subplot('position', [left bottom width height])
manually place the axes in the figure. Also, note the functions `get(h,'prop')` and `set(h,'prop',value)` are also available to adjust other axes properties. See the MATHWORK's handle graphics browser section on axes for documentation on all the available properties.
Problem
Am trying to get 3 images to be show side by side in matlab. But when I use subplot they are being spaced out unevenly. The first and second is a 25-by-25 pxl image and the third is a 25-by-75 image. How can i get it to be show like ``` +-----++-----++---------------+ | img || img || img | | 1 || 2 || 3 | +-----++-----++---------------+ ```