How do I write a line for adding a text to my plot?
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
