Hello,
I have array with two field (year and xx), for each year it has multiple y-value.
for exampel:
year = [2000 2001 2005 2008]
xx = [(5 10 20); (40 60); (30 20 10 50); (1)]
I am trying to plot scatter for each year (x-axis) all the coressponding values of xx (y-axis)
I was trying do it like this:
dataplot = []; dataplot = [dataplot; year xx yy zz]; [ay,~,cy] = unique(dataplot(:,1),'rows'); % to get just the unique year
figure scatter(year,xx,'*'); ax = gca; ax.XTick = 1:numel(ay); ax.XTickLabel = ay; ax.XLim = [0 numel(ay)+1];
Please find the mat file of the array in the attachements, (PS just the first two fields).
Thanks in advance
Best Answer