How do I write a line for adding a text to my plot?
20 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am trying to add a text to my plot. I tried adding the following line to the code: text('k=28');
I also tried: txt= 'k=28';
Both lines didn't add the text , I am atatching my existing code below. This code is part of the function file.
fig = figure('position', utilities.centerFigPos(1500, 1200));
set(fig, 'Color', 'white', 'defaultLineLineWidth', 2, 'defaultAxesFontSize', 24);
ax = axes(fig);
scatter(ax,X,Y,'o');
line(ax, xFit, yFit);
ax.Title.String = 'Data';
ax.XScale = 'linear';
ax.YScale = 'log';
ax.XLim = [0,1];
ax.YLim = [yMin,1];
ax.YDir = 'reverse';
0 件のコメント
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
