How to suplot 3 images (2D data) horizontally?
1 回表示 (過去 30 日間)
古いコメントを表示
I have 3 sets of 2D data that I would like to plot horizontally as part of one figure only. Here's the code:
clc; clear all;
load infinite;
load finite;
load gain;
% transpose matrix is not required
A1= log10(fs1);
A2= log10(fs2);
A3= log10(fs3);
subplot(1,3,1);p1=pcolor(ky*1e-6,f/1e12,A1);
xlabel('k_{\ity}({\mu}m^{-1})') ;
subplot(1,3,2);p2=pcolor(ky*1e-6,f/1e12,A2);
xlabel('k_{\ity}({\mu}m^{-1})') ;
subplot(1,3,3);p3=pcolor(ky*1e-6,f/1e12,A3);
xlabel('k_{\ity}({\mu}m^{-1})') ;
ylabel('{\itf} (THz)');
%colormap setting
shading interp;
colormap jet;%colormap need to be set to jet for Blue-yellow-red map
%colorbar setting
c = colorbar;
%labels the colorbar vertically as desired
set(get(c,'label'),'string','logscale');
c.TickLength=.056;
c.Units='pixel';
c.FontWeight='bold';
%font properties
FS='Fontsize';
fs=18;
FN='Fontname';
fn='Times New Roman';
set(findall(gcf,'type','axes'),FS,fs,FN,fn);
set(findall(gcf,'type','text'),FS,fs,FN,fn);
But for some reason the first two subplots are all blacked out:

What seems to be the issue here ? Also, the subfigures are really thin. I would like them to be the proper size for viewing ease. Also, I would like only one ylabel on the far left and one color bar on the far right. Can anyone help me please? I am new to Matlab.
TIA,
Zihad Azad
P.S.:The tables are attached herewith.