I remember in pascal we had such a thing to draw line with XOR drawmode(or writemode in assembly)
e.g. to draw a line from (5,5) to (100,5) we would do this in Pascal:
MoveTo(5, 5);
Pen.Mode := pmXOR;
LineTo(100,5);
Do we have similar thing for matlab plot (or line) functions? e.g:
% Pen.Mode = pmXOR;
plot(X,Y,'r+');
It looks like the property you are looking for is called
EraseMode. It is available on some graphics objects, but not all … you’ll have to experiment for you particular application.Some examples:
Use
get(hLine),get(hPeaks)etc. to see what properties are available for a given graphics object.To see all object which support the
EraseModeproperty, type