python - Discrete density plot in matplotlib -
i have 2d numpy array , want create discrete density plot using it. discrete in sense @ each point (i,j)
on plot dot should placed color should correspond value of (i,j)
th element of 2d array. not want use imshow
because not want interpolation , want control size dots placed.
have tried imshow
interpolation='nearest'
? close want?
import matplotlib.pyplot plt import numpy np data = np.arange(100).reshape(10, 10) fig, ax = plt.subplots() ax.imshow(data, interpolation='nearest') plt.show()
Comments
Post a Comment