How do i plot N amount of rows into a point plot?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Guys, how do you plot multiple rows into a point plot?
Here's what i've done so far:
figure(2)
F = grades(1,:);
E = 1:width(grades);
scatter(E,F)
xlabel('Assignment','FontSize',15);ylabel('Grade','FontSize',15);
yticklabels({'-3','00','02','4','7','10','12'});
title ('Grades per assignment','FontSize',20);
In this code i only plot row 1 but what if i need to plot N Rows? I need to write a code where the input argument is an NxM Matrix.
0 comentarios
Respuesta aceptada
Max Heimann
el 16 de En. de 2022
Whats the content of your variable "grades"?
You can plot multiple lines one after the other with the hold command. (A,B,C,D,E,F are your data vectors)
figure('Name','Example Plot')
scatter(A,B)
hold on
scatter(C,D)
scatter(E,F)
...
You could simply loop over your matrix and plot each line like this.
5 comentarios
Max Heimann
el 16 de En. de 2022
I did account for that by adding
(1 - 2 * rand) * 0.1
To the data on each cycle. This should be a random number between -.1 and .1. Did this not work?
Más respuestas (0)
Ver también
Categorías
Más información sobre Scatter Plots 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!