draw method#
Se verifica su funcionamiento para todas todas todas las graficas. Plottear no tarda nada, ver unit disk Time: 0.35030198097229004s
import proximitygraphs as pg
import time
uniform_sphere = pg.SetPoints.uniform_sphere(n=1000, seed=0)
uniform_sphere.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: title={'center': 'SetPoints'}>)
\(\gamma\)-graph#
start = time.time()
H = pg.Gamma_Graph(uniform_sphere, gamma0=0.5, gamma1=0.5, closed=True, block_size=128)
H.draw(details=True)
end = time.time()
print(f"Time: {end - start}s")
Time: 0.08372664451599121s
start = time.time()
H = pg.Gamma_Graph(uniform_sphere, gamma0=-0.1, gamma1=-0.1)
H.draw(details=True)
end = time.time()
print(f"Time: {end - start}s")
Time: 21.22017002105713s
Delaunay Triangulation#
start = time.time()
H = pg.DelaunayG(uniform_sphere)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.08202934265136719s
Convex Hull#
start = time.time()
H = pg.Convex_Hull(uniform_sphere)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.012156963348388672s
\(\alpha\)-shape#
start = time.time()
H = pg.Alpha_Shape(uniform_sphere, alpha=-5)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.02362799644470215s
\(\alpha\)-hull#
start = time.time()
H = pg.Alpha_Hull(uniform_sphere, alpha=-5, n_points_per_arc=50)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.027238130569458008s
\(\beta\)-skeleton con \(\beta \in [0, \infty)\)#
start = time.time()
H = pg.Beta_Skeleton(uniform_sphere, beta=0.99, type_region='intersection')
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 27.534096717834473s
start = time.time()
H = pg.Beta_Skeleton(uniform_sphere, beta=20, type_region='lune')
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.22568082809448242s
Gabriel Graph#
start = time.time()
H = pg.GG(uniform_sphere)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.1515514850616455s
Relative Neighborhood Graph#
start = time.time()
H = pg.RNG(uniform_sphere)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.22647857666015625s
MST#
start = time.time()
H = pg.MST(uniform_sphere)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.03305697441101074s
Stepping Stone#
start = time.time()
H = pg.Stepping_Stone(uniform_sphere, d=3, k=3)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.2618544101715088s
NNG#
start = time.time()
H = pg.NNG(uniform_sphere, k=2)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.025710105895996094s
Sigma Graph#
start = time.time()
H = pg.Sigma_Graph(uniform_sphere)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 14.410646438598633s
Unit Disk#
start = time.time()
H = pg.Unit_Disk(uniform_sphere, dist_max=0.2)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.35030198097229004s
SIG#
start = time.time()
H = pg.SIG(uniform_sphere)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.28902506828308105s
Eliptic GG#
start = time.time()
H = pg.Elliptic_GabrielG(uniform_sphere)
H.draw(details=True)
end = time.time()
print(f"Time: {end-start}s")
Time: 0.2631106376647949s
Custom kwargs#
H.draw(
v_kwargs={"marker": "x", "zorder": 3, "s": 20, "alpha": 0.6},
e_kwargs={"linestyle": "--"},
fig_kwargs={"facecolor": "none"},
title_kwargs={"loc": "left", "fontsize": 16},
)
(<Figure size 600x600 with 1 Axes>,
<Axes: title={'left': 'Elliptic Gabriel Graph'}>)