I want to create a line with circular markers at each data point outside the axes in a MATLAB figure, similar to what
line([x1 x2],[y1 y2],'Color','k','Marker','o')
would produce.
To place the line object outside the axes, I have simply tried using annotation:
annotation('line',phi1([x1 x2]),phi2([y1 y2]),'Color','k','Marker','o')
where phi1 and phi2 are appropriate coordinate transforms to fit the coordinates x and y inside the axes of the current figure.
I expected this to work since line objects have a marker property. However, with annotation, I am getting the following error message:
Error using matlab.graphics.shape.Line/set
There is no Marker property on the Line class.
Error in matlab.graphics.chart.internal.ctorHelper (line 8)
set(obj, pvpairs{:});
Error in matlab.graphics.shape.Line
Error in annotation (line 128)
h = matlab.graphics.shape.Line(aargs{:});
Similarly, when plotting a rectangle with the annotation function, one cannot set the Curvature property. It seems that annotation does not support these kinds of properties, even though it creates a line or rectangle object just like the line or rectangle functions would. I tried fiddling around with the annotation handles and children, but no success there.
Any ideas for a workaround?
