How to avoid text overlapping automatically in plot3?

조회 수: 12 (최근 30일)
Xiaohan Du
Xiaohan Du 2016년 11월 3일
편집: Xiaohan Du 2016년 11월 3일
Hello guys,
I have a few points in 3d space indicating the reduction of error. As you can see from the plot there are some points overlapping with each other. How can I avoid this automatically? Add blank space before the numeral manually is not a good option.
Another thing is that how can I make this indication of error reduction visually better? Maybe add some arrow on the line? Any ideas?
Thanks!

답변 (1개)

Jan
Jan 2016년 11월 3일
You want to set the positions of the labels considering 2 criteria:
  • The text areas do not overlap
  • The labels appear next to the data points, such that it is clear to which point they belong to
The problem is not trivial, because the 2nd criterion cannot be defined easily in mathematical terms. It is a complicated optimization problem which must take into account the visual reception system of humen. In addition the solution will depend on the medium the diagram is displayed on: You can simply and intuitively rotate it in 3D on the screen to "look behind the labels": Users are used to change their 3D position to look behind obstacles. But this fails, when the diagram is printed on paper.
Do you simply want to visualize the results of some computations or is you goal writing a PhD about optimal label placement in scientific publications?
I'd decide for short labels and a legend. Even then an overlap can and will happen if the view angle is fixed, but it will be much faster to control this manually.
  댓글 수: 1
Xiaohan Du
Xiaohan Du 2016년 11월 3일
편집: Xiaohan Du 2016년 11월 3일
Hi Jan,
Thanks for the reply! I simply want to visualize the tendency of error reduction in a 3d space. The goal is to show the error reduction clearly, and I'd like to show the route too. Here is the data of [x, y, error]:
a =
25.0000 25.0000 0.0519
25.0000 1.0000 0.0083
1.0000 23.0000 0.0027
24.0000 13.0000 0.0011
1.0000 14.0000 0.0006
25.0000 13.0000 0.0003
10.0000 16.0000 0.0003
21.0000 22.0000 0.0001
and I draw the ideal plot by hand like this (different data but same idea):
I use some arrows at line end to show the route of decay in 3D space, but it doesn't look very nice. Any better ideas?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by