Effacer les filtres
Effacer les filtres

How to make contour to have the same axes

4 vues (au cours des 30 derniers jours)
University
University le 9 Fév 2024
Commenté : University le 9 Fév 2024
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 commentaires
University
University le 9 Fév 2024
Modifié(e) : Torsten le 9 Fév 2024
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 le 9 Fév 2024
Thank you so much Cris and Torsten.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Graphics Object Programming dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by