Axis labels dont show after text command

5 ビュー (過去 30 日間)
Alex Mulders
Alex Mulders 2023 年 6 月 2 日
回答済み: VBBV 2023 年 6 月 2 日
i would like to make a plot with a couple of lines with a text anotation with some value on the line. I made this work but when i want to add the axis labels they dont show up. If i comment out the text command the labels do show. what could the cause of this be and how could i solve this?
see the code and the plot below.
figure
for i = 1:length(wCool)
zdiff = T(:,:,i) - 50*ones(length(cer.k),length(hCer));
[x, y] = meshgrid(hCer,cer.k);
C = contours(x, y, zdiff, [0 0]);
xL = C(1, 2:end);
yL = C(2, 2:end);
zL = interp2(x, y, T(:,:,i), xL, yL);
%if ~isempty(zL)
[~,I] = min((abs(xL-5)));
text(xL(I),yL(I)+4,sprintf('w=%s',num2str(wCool(i))),'HorizontalAlignment','center');
line(xL, yL, zL, 'Color', 'k', 'LineWidth', 1);
%end
end
xlabel('Plate thickness [mm]'); ylabel('Thermal conductivity [W/mK]');

回答 (1 件)

VBBV
VBBV 2023 年 6 月 2 日
Did you write custom function with name contours or you wanted to use Matlab's built-in function contour .?
% custom function or Matlab's contour
C = contour(x, y, zdiff, [0 0]);

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by