Plotting voronoi tesselations without its seeds

2 ビュー (過去 30 日間)
Sebastian Naranjo
Sebastian Naranjo 2020 年 2 月 19 日
回答済み: Akira Agata 2020 年 3 月 17 日
I am trying to get a picture of a voronoi tesselation and I am using the Voronoi command to do it. The problem I encounter is that this command plots the seeds that I fed to create the figure and I have not been able to figure out how to undo this.

回答 (1 件)

Akira Agata
Akira Agata 2020 年 3 月 17 日
How about the following?
% Seeds
x = gallery('uniformdata',[1 10],0);
y = gallery('uniformdata',[1 10],1);
% Calculate Voronoi diagram
[vx,vy] = voronoi(x,y);
% Visualize the result
figure
plot(vx,vy,'b-')
% Uncomment this part, if you want to show the seeds
% hold on
% plot(x,y,'rx')
xlim([min(x) max(x)])
ylim([min(y) max(y)])

カテゴリ

Help Center および File ExchangeVoronoi Diagram についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by