It depends what you want and what you expect. If all you want is one or two pictures, it's by far easier to do this manually outside of Matlab.
That said, here's a passing attempt to get rid of the lines.
inpict = rgb2gray(imread('testgraph.jpg'));
fk = repmat([-1 1],[w 1])./w;
b = imfilter(inpict,fk.');
c = bwareafilt(a>t,13,4) | bwareafilt(b>t,11,4);
c = bwmorph(c,'skel',100);
d = imdilate(bwareafilt(~c,1),ones(7));
c = imdilate(c&~d,ones(4));
If you want to convert the image to numeric data, that's something else. Considering how almost every single graph I've ever tried to process or transcribe has been a tiny JPG with thick ambiguous lines and a crust of artifacts, I can't imagine any automated approach that isn't an exercise in frustration.
Here's an example, continuing from above:
c = bwmorph(inpict<128,'skel',100);
S = regionprops(c,'boundingbox');
xl = [S.BoundingBox(1) sum(S.BoundingBox([1 3]))];
yl = [S.BoundingBox(2) sum(S.BoundingBox([2 4]))];
lpict = (255-outpict).*uint8(~d);
lpict = bwmorph(lpict>128,'thin',100);
x = xrange(1) + diff(xrange)*(x-xl(1))./diff(xl);
y = yrange(2) - diff(yrange)*(y-yl(1))./diff(yl);