Draw shapes not in a graph

조회 수: 2 (최근 30일)
Nimrod Limor
Nimrod Limor 2021년 1월 16일
댓글: Star Strider 2021년 1월 16일
Hello all,
I want to draw shapes such as dots, circles, rectangles etc. in a Matlab figure, but not in a graph.
I mean a blank screen and shapes in it.
Anyone can help?

답변 (2개)

ercan duzgun
ercan duzgun 2021년 1월 16일
I think you can specify any points of the figure, and set the points as "white" color to let it invisible. And draw the shapes at those points. Therefore only the shapes will be seen. Does that meet your requirements?
  댓글 수: 1
Nimrod Limor
Nimrod Limor 2021년 1월 16일
In what functions do I use to do so?

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


Star Strider
Star Strider 2021년 1월 16일
Try something like this:
x1 = rand(1,5);
y1 = rand(1,5);
x2 = rand(1,7);
y2 = rand(1,7);
figure
plot(x1, y1, 'or', 'MarkerSize',20)
hold on
plot(x2, y2, 'sg', 'MarkerSize',20)
hold off
set(gca, 'Color','none', 'GridAlpha',0, 'XColor','none', 'YColor','none', 'ZColor','none') % This Turns Off Everything That Would Make It Appear As A ‘plot’
producing (in these random calls):
.
  댓글 수: 2
Nimrod Limor
Nimrod Limor 2021년 1월 16일
Thank you!
That realy helpfull!
Star Strider
Star Strider 2021년 1월 16일
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by