Effacer les filtres
Effacer les filtres

how to plot 3 image in parallel

13 vues (au cours des 30 derniers jours)
aqilah jalil
aqilah jalil le 12 Juin 2020
Modifié(e) : Vishal Gaur le 12 Juin 2020
subplot(2,1,1)
imshow(img1)
subplot(2,1,2)
imshow(img2)
i know this can produce 2 image in parallel how can i do 3 image like | img1| img2 | img3

Réponses (1)

Vishal Gaur
Vishal Gaur le 12 Juin 2020
Modifié(e) : Vishal Gaur le 12 Juin 2020
Let me clarify, how subplot function works. Subplot(m,n,p) divides the current figure into mXn grids and creates axes in the position specified by p. For example:
subplot(3,2,3)
It will divide the current figure into 3X2 grid and plot the specified image or plot to the 3rd position or grid 2,1. MATLAB numbers position by row.
So, if you want to plot three images you can divide the figure in 1X3 grids or 3X1 grids. Code for 1X3 grid is given below.
subplot(1,3,1)
imshow(img1)
subplot(1,3,2)
imshow(img2)
subplot(1,3,3)
imshow(img3)
For more information, you can check the documentation.

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by