Azzera filtri
Azzera filtri

How to make contour to have the same axes

4 visualizzazioni (ultimi 30 giorni)
University
University il 9 Feb 2024
Commentato: University il 9 Feb 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 Commenti
University
University il 9 Feb 2024
Modificato: Torsten il 9 Feb 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 il 9 Feb 2024
Thank you so much Cris and Torsten.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Graphics Object Programming in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by