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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169645/image.png)
When I save it as a pdf and zoom in e.g. at the central data point it looks like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169647/image.png)
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!