Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I don't know the answer in sage but it is easy in matplotlib

import matplotlib
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import numpy as np


fig = plt.figure()
array=np.zeros((100,100))
for i in range(100):
    for j in range(100):
        array[i][j]=sin(0.1*i)*cos(0.1*j)
#norm=matplotlib.colors.Normalize(0.995,1.0)
im1 = plt.imshow(array, cmap=cm.hot, origin='lower',clip_on=True,filternorm=1)
#im1.set_norm(norm)
plt.colorbar()
plt.savefig('test.png')