How can I decrease the Gap between my 2 Subplots?

조회 수: 2 (최근 30일)
Ajadin Nuredini
Ajadin Nuredini 2022년 5월 30일
답변: Biral Pradhan 2022년 6월 3일
p_rgb = flip(p_r + p_g + p_b); % flip: Um Matrix zu "drehen"
P_rgb = reshape(p_rgb', m, n); % Leistungsmatrix [mW/cm^2]
P_rgb = fliplr(P_rgb)*A_pix_cm2*1e3 ; % Von [mW/cm^2] auf [uW]
subplot(1,2,1);
imshow(uint8(bild)); % Input Bild Plotten
breite = int2str(m); laenge = int2str(n);
word = append('Bild Input mit ', breite, ' x ', laenge, ' Grösse');
title(word)
subplot(1,2,2);
pcolor(P_rgb); % Bild mit Leistung/Pixel plotten [uW]
title('Bild (gespieglet) mit Pixel Leistungen codiert')
shading flat; % Entfernt des Gitter (Bild nicht mehr ueberdeckt)
yticks([]); xticks([]) % Löschen der Achsen-Gitter Beschriftungen
c = colorbar ; % Z - Achsenbeschriftung
c.Label.String = 'P [uW]';
c.Label.FontSize = 12;
colormap('parula'); % andere Plot Funktionen pcolor, imagesc, imshow

답변 (1개)

Biral Pradhan
Biral Pradhan 2022년 6월 3일
I understand, you are generating two subplots and want to decrease the spacing between them. Kindly follow the following links to resolve the issue.

태그

Community Treasure Hunt

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

Start Hunting!