Histograma de la distribución de los puntos


In [1]:
import sys

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
%matplotlib inline

sys.path.append('../src/')
from ten.utils import generate_random_points_in_sphere

In [2]:
points = generate_random_points_in_sphere(300000, 5, 0)
bins = 300

fig = plt.figure(figsize=(12,7))

ax1 = plt.subplot(231)
ax1.set_aspect(1)
ax1.hist2d(points[:, 0], points[:, 1], bins=bins)

ax2 = plt.subplot(232)
ax2.set_aspect(1)
ax2.hist2d(points[:, 1], points[:, 2], bins=bins)

ax3 = plt.subplot(233)
ax3.set_aspect(1)
ax3.hist2d(points[:, 2], points[:, 0], bins=bins)

ax4 = plt.subplot(234)
ax4.hist(points[:, 0])

ax5 = plt.subplot(235)
ax5.hist(points[:, 1])

ax6 = plt.subplot(236)
ax6.hist(points[:, 2])


Out[2]:
(array([  8660.,  22984.,  33436.,  40842.,  44036.,  44278.,  40548.,
         33684.,  22909.,   8623.]),
 array([ -4.98506880e+00,  -3.98746061e+00,  -2.98985243e+00,
         -1.99224424e+00,  -9.94636059e-01,   2.97212581e-03,
          1.00058031e+00,   1.99818850e+00,   2.99579668e+00,
          3.99340487e+00,   4.99101305e+00]),
 <a list of 10 Patch objects>)

In [3]:
#Este css esta basado en el de @LorenaABarba y su grupo
from IPython.core.display import HTML
css_file = 'css/personal.css'
HTML(open(css_file, "r").read())


Out[3]:
Licencia

El código esta licenciado bajo MIT.

La documentación bajo:
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">TEN</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Laboratorio de Microscopia Óptica Avanzada - UNRC</span> is licensed under a Creative Commons Attribution 4.0 International License.
Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="https://github.com/pewen/ten" rel="dct:source">https://github.com/pewen/ten</a>