function [] = annotated_graph(stem, start, stop)
X = csvread([stem '.csv']);

fp = fopen([stem '.atr.csv']);
A = textscan(fp, '%s%d%s%d%d%d%s', 'Delimiter', ',', 'CollectOutput', 1);

if (start < 0)
start = 0;
end
if (stop > length(X))
stop = length(X);
end

plot(X(start:stop, 1), X(start:stop, 2), 'LineWidth', 2);
xlim([start stop])
yr = get(gca, 'YLim');

first = min(find(A{2} >= start));
last = max(find(A{2} <= stop));
idx = A{2};
code = A{3};
aux = A{5};
for i = first:last
x = double(idx(i));
y = yr(1) + (yr(2) - yr(1)) * 0.1;

h = line([x x], yr);
set(h, 'Color', [1 0 0 ]);
if length(aux{i}) > 0
label = [code{i} '/' aux{i}];
else
label = code{i};
end
text(x + 5, y, label);
end