In "new" MATLABs, the marker in the plot is not precisely located.

Dear all,
It seems that MATLAB updated the plot part since 2014. But I find some problems in the plot in these "new" MATLABs.
Problem 1, the circle is not an exact circle, but a polygon. Fortunately, this problem has been solved in the latest 2017a.
Problem 2, the marker is not precisely located at the data point. Attached are a simple test script and the results from 2013b, 2016a and 2017a. In the plot generated by 2016a and 2017a, if we look at the first point, the circles are not located at x=1 precisely. And this problem doesn't exit in the old 2013b.
Any thought and solution about this?
Best,
Binglun

5 Comments

Is it vitally important? A circle like that is not an accurate location of a single point anyway since it has a diameter.
Thanks Adam,
But I think it has nothing to do with the diameter of a circle. The center of a circle MUST be exactly the data point. This can be important in some cases. For example, once I plot a curve which decays rapidly with increasing x. But the curve plotted by MATLAB 2016a shows a wavy shape in the tail and looks like there is some "noise" in the data. But actually, my raw data is fine. And this "noise" in the plotted curve is completely induced by this problem.
I don't see it. Where exactly is the problem in the 2017 plot?
2013: the circle is centered on the center of the axis line
2017: the circle seems to be centered on the LHS of the axis line. The red line also seems to be aligned to its top edge, not to the center of the line.
I think it is a bug from version 2014. I suggest you to contact mathworks directly.

Sign in to comment.

Answers (1)

Does the problem concern the display on the screen or the export to vector graphics? Perhaps this helps: https://www.mathworks.com/matlabcentral/answers/328478-misplaced-line-markers-after-saving-as-eps-pdf .

5 Comments

Thanks Simon, the info is really very helpful.
Now I think 2017a is much improved compared to 2016a, see the new testing figs.
In 2016a, the all the markers are misplaced. In 2017a, triangle and square are fine while the "round things" (circle and dot) are misplaced.
Even the circles are misplaced in both 2016a and 2017a, there is a difference. In 2016a, the circles are misplaced in a random way, i.e., the "shift vector" looks random for each point. But in 2017a, the "shift vector" looks more uniform.
Currently, maybe we can use just triangle and square in 2017a. They are fine.
I really can't see anything wrong in either of those plots!
See the file 2017a.pdf. Do you think the red circle (2,1) is precisely located at (2,1)?
If I zoom in a long way it isn't, but I can't tell at the standard zoom.
I agree with B Yin: the circles are offset to the left by about the width of a grid line. The earlier versions do not show this: the circles are centered.

Sign in to comment.

Products

Asked:

on 1 Jun 2017

Commented:

on 1 Jun 2017

Community Treasure Hunt

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

Start Hunting!