We firstly make data a matrix. Each row is named grades, and the row number is a. Then python code can be tranlated to matlab one:
data = [[10, -3, 10, 7, 0, 12];
[12, 12, 12, 10, 0, 12];
[7, 7, 10, 10, 0, 10];
[7, 4, 7, 7, 0, 12];
[-3, 4, 7, 4, 4, 12];
[7, 4, 4, 4, 0, 12]];
jitter_min = -0.1;
jitter_max = 0.1;
for a = 1:1:size(data,1)
grades = data(a,:);
x = (a-1)*ones(size(grades)) + (jitter_max-jitter_min)*rand(size(grades))+jitter_min;
plot(x, grades, 'o')
hold on
end
xlabel('Assignments')
ylabel('Grades')