import numpy as np
import matplotlib.pyplot as plt

from cellcomplex.property_topomesh.example_topomesh import circle_voronoi_topomesh

from cellcomplex.property_topomesh.utils.matplotlib_tools import mpl_draw_topomesh, mpl_draw_incidence_graph

np.random.seed(108)
_,topomesh = circle_voronoi_topomesh(2,circle_size=8,return_triangulation=True)

figure = plt.figure(0)
figure.clf()

figure.add_subplot(1,2,1)
figure.gca().axis('equal')
mpl_draw_topomesh(topomesh,figure,2,color='g')
mpl_draw_topomesh(topomesh,figure,1,color='b')
mpl_draw_topomesh(topomesh,figure,0,color='m')
figure.gca().axis('off')

figure.add_subplot(1,2,2)
figure.gca().axis('equal')
mpl_draw_incidence_graph(topomesh,figure)
figure.gca().axis('off')

figure.set_size_inches(10,5)
figure.tight_layout()