Draw shapes not in a graph

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?

Respuestas (2)

ercan duzgun
ercan duzgun el 16 de En. de 2021

0 votos

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?
Star Strider
Star Strider el 16 de En. de 2021

0 votos

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 comentarios

Nimrod Limor
Nimrod Limor el 16 de En. de 2021
Thank you!
That realy helpfull!
Star Strider
Star Strider el 16 de En. de 2021
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2020b

Etiquetas

Preguntada:

el 16 de En. de 2021

Comentada:

el 16 de En. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by