Scatter plot: Slightly wrong position of measurement points when they are drawn as circles

1 Ansicht (letzte 30 Tage)
I created a minimal example to illustrate my problem:
x=[1 1.5 2];
scatter(x,x)
hold on
scatter(x,x,'*r')
grid on
So I get the following plot:
When I save it as a pdf and zoom in e.g. at the central data point it looks like this:
While the Asterisks measurement point is drawn exactly at the intersection of the grid lines (where it should be), the circle is slightly shifted to the lower left corner. I tried nearly all standard marker types in Matlab and all of them seem to be positioned at the right spot, except the circle. It would be great if anyone has an explanation and maybe a simple solution for the issue.
I am using the MATLAB version R2017a.

Akzeptierte Antwort

Chris Perkins
Chris Perkins am 17 Nov. 2017
I ran your reproduction code in several versions of MATLAB.
In R2017a and R2016b, I observe the same issue that your image shows. However, in R2017b, the circle displays correctly (it is centered properly).
If you, or anyone else running into this issue, needs the circle in scatter to be correctly centered, you can upgrade to R2017b where it displays correctly.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by