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

1 vue (au cours des 30 derniers jours)
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.

Réponse acceptée

Chris Perkins
Chris Perkins le 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.

Plus de réponses (0)

Catégories

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by