Test Set_Points#
Se testean los metodos para la creación de puntos aleatorios basados en una distrbución
from proximitygraphs import SetPoints
uniform_square#
square = SetPoints.uniform_square(n=200, seed=73)
square.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
square.draw(v_kwargs={"marker": "x", "linewidths": 1.5, "c": "#00072D", "s": 60, "alpha": 0.6, "zorder": 3})
c:\Users\herie\GitHub\proximitygraphs\proximitygraphs\points.py:769: UserWarning: You passed a edgecolor/edgecolors ('none') for an unfilled marker ('x'). Matplotlib is ignoring the edgecolor in favor of the facecolor. This behavior may change in the future.
ax.scatter(self.points[:, 0], self.points[:, 1], **scatter_kwargs)
(<Figure size 600x600 with 1 Axes>, <Axes: >)
uniform_over_sphere#
uniform_over_sphere = SetPoints.uniform_over_sphere(n=200, seed=0)
uniform_over_sphere.draw(title=True, details=True)
(<Figure size 600x600 with 1 Axes>, <Axes: title={'center': 'SetPoints'}>)
uniform_sphere = SetPoints.uniform_sphere(n=200, seed=0)
uniform_sphere.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
Normal Distributed#
normal = SetPoints.normal_dist(n=200, seed=0)
normal.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
Grids#
grids = SetPoints.grid(shape=(5,5))
grids.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
Hexagonal#
hexagon = SetPoints.hexagonal(n_x=5, n_y=3)
hexagon.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
hexrotated = hexagon.rotation(degree=True, angle=30)
hexrotated.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
hexscaled = hexagon.scaling(scale = [2,1])
hexscaled.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
hextraslated = hexagon.traslation(c = [1,2])
hextraslated.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
perturb = hexagon.perturb(radius=0.1)
perturb.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
Triangular#
triangle = SetPoints.triangular(n_x=10, n_y=10)
triangle.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
Poisson process#
poisson = SetPoints.poissonprocess_square(intensity=50.5, limit=1)
poisson.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)
Poisson process Circle#
PoissCircle = SetPoints.poissonprocess_circle(intensity=10.5, radius=1)
PoissCircle.draw()
(<Figure size 600x600 with 1 Axes>, <Axes: >)