Scatter plot: Slightly wrong position of measurement points when they are drawn as circles
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Chris Perkins
2017-11-17
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scatter Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!