MATLAB: Plot is making marker at origin

guimarkerMATLABorigin

In my gui code for plotting resultant vectors from gravity, when I plot the circles to represent point masses, I'm getting a marker at the origin. I don't know why it shows a marker, but it only seems to do it whenever one point is far enough away from the origin to move the boundary of the graph.
%get user data from gui
plot(x1,y1,'.','markersize',60)
hold on
plot(x2,y2,'.r','markersize',60)
hold off
The problem occurs in the plot, where a 3rd marker is appearing with the characteristics of the last marker created at the origin. How can I remove this 3rd marker from the plot as it is not needed?

Best Answer

Jared - are x1, y1, x2, y2 scalars or vectors? If they are vectors, then you could very well be replacing the original point, (x1,y1), with the marker depending upon how you are creating x2 and y2. For example,
figure;
x1 = 10;
y1 = 10;
x2 = [x1 50];
y2 = [y1 50];
plot(x1,y1,'.','markersize',60)
hold on
The above call to plot creates a blue dot at the centre ("origin") of the figure. And once we call
plot(x2,y2,'.r','markersize',60)
hold off
because x2 and y2 include the origin of (x1,x2), the original blue dot is replaced with the red marker. Is this what is happening?