How to label points on a plot, when data is imported from a matrix?

22 visualizzazioni (ultimi 30 giorni)
I have a code that outputs a number of graphs. At each data point I wish to place next to it a label that says n=1, ...., n=6, corresponding to each data point on the graph. Here is the code I have:
D= load('Convergence.csv');
A=D(:,1);
B=D(:,2);
figure(1);
plot(A,B,'-O','LineWidth',3,'MarkerSize',10,'MarkerFaceColor','[0.9100 0.4100 0.1700]');
xlabel ('Number of Cells','LineWidth',3);
ylabel('Velocity [m/s]')
grid
C=D(:,3);
figure(2);
plot(A,C,'-O','LineWidth',3,'MarkerSize',8,'MarkerFaceColor','[0.9100 0.4100 0.1700]');
xlabel('Number of Cells');
ylabel('Velocity [m/s]');
grid
d=D(:,4);
figure(3);
plot(A,d,'-O','LineWidth',3,'MarkerSize',10,'MarkerFaceColor','[0.9100 0.4100 0.1700]');
xlabel('Number of Cells');
ylabel('Velocity [m/s]');
grid
E=D(:,5);
figure(4);
plot(A,E,'-O','LineWidth',3,'MarkerSize',10,'MarkerFaceColor','[0.9100 0.4100 0.1700]');
xlabel('Number of Cells');
ylabel('Surface Average Pressure Coefficient');
grid
F=D(:,5);
figure(4);
plot(A,F,'-O','LineWidth',3,'MarkerSize',10,'MarkerFaceColor','[0.9100 0.4100 0.1700]');
xlabel('Number of Cells');
ylabel('Mass Flow Rate [kg/s]');
grid

Risposte (1)

madhan ravi
madhan ravi il 12 Dic 2018

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by