# Problem 6: Consider using the following functions in your implementation.
#
from scipy.io import loadmat as load
from matplotlib.pyplot import figure as figure
from matplotlib.pyplot import imshow as imshow
from scipy.spatial.distance import pdist as pdist
from scipy.spatial.distance import squareform as squareform
from numpy import reshape as reshape
from numpy import array as array
from numpy import mat as mat
from numpy import diag as diag
from numpy import power as power
from numpy import ones as ones
from numpy import transpose as transpose
from numpy import eye as eye
from matplotlib.pyplot import show as show
from numpy import mean as mean
from numpy.linalg import svd as svd
from matplotlib.pyplot import title as title
from mpl_toolkits.mplot3d import Axes3D as Axes3D
from matplotlib.pyplot import scatter as scatter
from matplotlib.pyplot import savefig as savefig
from numpy import array as array
# Load data
data = load('bunny.mat');
X = data['X']
sz = data['sz']
theta = data['theta']
# Example: plotting a bunny
figure()
bunny = reshape(X[0,:],(sz[0,0],sz[0,1],sz[0,2]),order='F')
imshow(bunny,clim=(0,1))
title('first bunny')
savefig('first_bunny.png')
# Example: 3D scatter plot
ax = Axes3D(figure())
ax.scatter(range(10),range(10),range(10),c=range(10),cmap='jet')
title('example 3D scatter plot')
savefig('3d_scatter.png')