필터 지우기
필터 지우기

How to make contour to have the same axes

조회 수: 4 (최근 30일)
University
University 2024년 2월 9일
댓글: University 2024년 2월 9일
I have a two different plots with 2 different axes. The second plot (fig2) is extracted from the first plot (fig1).
Please how can I make the extract plot to have the same axis as the first one. I tried aspect ratio function but couldn't work.
openfig('fig1.fig');
openfig('fig2.fig');
  댓글 수: 11
University
University 2024년 2월 9일
편집: Torsten 2024년 2월 9일
load data_0_125.mat
figure;
xi = linspace(0, 125,20);
L=linspace(2e-08, 6.66666666666667e-06, 20);
[C,h] = contourf(L, xi, intul, [min(min(intul)):0.05e-11:max(max(intul))],'ShowText','off','edgecolor','none');
c = colorbar;
c.TickLabelInterpreter='latex';
c.Label.String = '$\int u_L \mathrm{dz} $';
c.Label.Interpreter = 'latex';
colormap jet
clabel(C,h)
hold on
for i=1:length(L)
for j=1:length(xi)
plot(L(i), xi(j), 'w.', 'LineWidth', 2, 'MarkerSize', 5)
end
end
set(gca,'clim',[min(min(intul)) max(max(intul))]);
Warning: Error updating Text.

String scalar or character vector must have valid interpreter syntax:
$\int u_L \mathrm{dz} $
%%%%%
load data_xi_48_123.mat
figure;
xivals = linspace(47.8947, 123.158, 20);
Lvals = linspace(7.19649e-07, 3.51825e-06, 20);
[C,h] = contourf(L, xi, intul, [min(min(intul)):0.05e-11:max(max(intul))],'ShowText','off','edgecolor','none');
c = colorbar;
c.TickLabelInterpreter='latex';
c.Label.String = '$\int u_L \mathrm{dz} $';
c.Label.Interpreter = 'latex';
colormap jet
clabel(C,h)
set(gca,'clim',[min(min(intul)) max(max(intul))]);
Warning: Error updating Text.

String scalar or character vector must have valid interpreter syntax:
$\int u_L \mathrm{dz} $
University
University 2024년 2월 9일
Thank you so much Cris and Torsten.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by