Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- from mpl_toolkits.mplot3d import Axes3D
- #%% pdf estimation 3d
- # X1
- fig = plt.figure(figsize=(10,10))
- ax = fig.add_subplot(111, projection='3d')
- hist, xedges, yedges = np.histogram2d(X1[:, 45], X1[:,120], density=True)
- xpos, ypos = np.meshgrid(xedges[:-1], yedges[:-1], indexing="ij")
- xpos = xpos.ravel()
- ypos = ypos.ravel()
- zpos = 0
- dx = np.ones_like(zpos)
- dy = np.ones_like(zpos)
- dz = hist.ravel()
- ax.bar3d(xpos, ypos, zpos, dx, dy, dz, zsort='average')
- plt.title('pdf estimation of X1')
- #plt.savefig('/media/jeremiah/7E9BF5A34D96B6A4/2019.4/Processos Estocasticos/Trabalho 2/pdf_estimation_X1_3d.png')
- plt.show()
- #--------------------------------------------------------------------------------
- # X2
- fig = plt.figure(figsize=(10,10))
- ax = fig.add_subplot(111, projection='3d')
- hist, xedges, yedges = np.histogram2d(X2[:, 45], X2[:,120], density=True)
- xpos, ypos = np.meshgrid(xedges[:-1], yedges[:-1], indexing="ij")
- xpos = xpos.ravel()
- ypos = ypos.ravel()
- zpos = 0
- dx = np.ones_like(zpos)
- dy = np.ones_like(zpos)
- dz = hist.ravel()
- ax.bar3d(xpos, ypos, zpos, dx, dy, dz, zsort='average')
- plt.title('psf estimation of X2')
- #plt.savefig('/media/jeremiah/7E9BF5A34D96B6A4/2019.4/Processos Estocasticos/Trabalho 2/pdf_estimation_X2_3d.png')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment