Hello! Imagesc command with multiple axis

조회 수: 3 (최근 30일)
Lutful Ahad
Lutful Ahad 2015년 10월 31일
편집: Lutful Ahad 2015년 11월 1일
Hello!
I need help about plotting a graph with multiple axis. The quantities I have are, Omega, del_omega which I want to be on the bottom x axis and y axis at the right while the quantities y and px on the right side y axis and top x axis respectively. The code I am trying is.
imagesc(Omega,del_omega,abs(wd(1:2045,1:2045))) % wd is a 2045x2045 matrix.
axis xy
ax1=gca;
xlabel('\Omega [Hz]','FontSize',38)
ylabel('\Delta\Omega [Hz]','FontSize',38)
% ax1_pos = set(ax1,'Position');
ax2 = axes('Position',get(ax1,'Position'),'XAxisLocation','top','YAxisLocation','right','Color','none');
imagesc(px,y,abs(wd(1:2045,1:2045)),'Parent',ax2)

답변 (1개)

Walter Roberson
Walter Roberson 2015년 11월 1일
hold on
plot(ax1, omega, del_omega);
plot(ax2, px, y);

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by