# Voronoi Diagram

![Voronoi diagram on the region image](https://1268872846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWT7bo4Xbl2jOnmH1yB%2F-LYbIht_RmbWoOVKCYpl%2F-LYbO7YPKJDM9sbw6irA%2FvoronoiImage.PNG?alt=media\&token=d6f55760-df25-4b4c-b0e6-4bb958054c18)

#### Calculating Voronoi Diagram

![Calculating Voronoi](https://1268872846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWT7bo4Xbl2jOnmH1yB%2F-Lo4jzKDLvo--8ListOh%2F-Lo4n9rpEejmidgmCq8A%2FvoronoiMenu.png?alt=media\&token=fe19c9c9-840a-463d-b4c3-8a9adec0b831)

In order to calculate the [Voronoi diagram](https://help.codex.bio/codex/mav/technical-notes/algorithms) click 'Voronoi' item in the 'Analysis' menu.

![Choose region](https://1268872846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWT7bo4Xbl2jOnmH1yB%2F-LYbIht_RmbWoOVKCYpl%2F-LYbNMBG9kwQy5VMDtSq%2FvoronoiRegion.PNG?alt=media\&token=551592b5-9522-45f8-8178-4aa6765267a4)

Then you will see dialog where you will be able to choose region where Voronoi overlay will be shown.

![Voronoi activity](https://1268872846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWT7bo4Xbl2jOnmH1yB%2F-LYbIht_RmbWoOVKCYpl%2F-LYbNmBK78soMVUmSzO-%2FvoronoiActivity.PNG?alt=media\&token=f98a8964-8add-4d36-99d2-52f7f24bccf4)

After clicking on the 'OK' button corresponding activity will appear in the [Background activities panel](https://help.codex.bio/codex/mav/user-instructions/main-menu). When calculation completes, the overaly will be rendered to the image region.

![Export Voronoi](https://1268872846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWT7bo4Xbl2jOnmH1yB%2F-LYbIht_RmbWoOVKCYpl%2F-LYbNus_9ydfohJuqOy-%2FexportVoronoi.png?alt=media\&token=637b5c5f-658a-44ab-b379-bf2664fdef25)

You are able to export Voronoi overlay as PNG image. You need to click on the 'Export Voronoi' item in the 'Tools menu' and then choose a folder where images will be exported

#### Updating Voronoi

Changes on a [population](https://help.codex.bio/codex/mav/user-instructions/population-table) that are automatically propagated to the Voronoi overlay include:

* Setting a new color
* Changing population visibility
* Adding a new population
* Removing population
