I have code that produces a plot based on the example below. I would like to force the outputted plot to be a 128x128
square if possible instead of 64x128
. The data I have is intended to be viewed as a square even though its matrix does not exhibit NxN properties.
Thank you.
import numpy as np
import pylab as pl
my_matrix = []
for x in range(128):
row = []
for value in range(64):
row.append( float(value) / 63 )
my_matrix.append(row)
array = np.matrix(my_matrix)
pl.axes()
pl.imshow(array, interpolation='none', cmap='jet', origin='lower')
pl.colorbar(shrink=0.95)
pl.xticks(())
pl.yticks(())
pl.show()