Christopher Ellison : > Taking the image size to (30,30) made all the segments appear, but their > thickness was still not uniform. Using some sort of smoothing helped, > but it still not displaying what the matrix was specified as: a set of > blocks, somewhat resembling a line, all of which are the same color and > thickness. > > Can I have matplotlib show the matrix as I have specified it? Or is > that too naive (on my part)? Thickness is not uniform, since the system MUST truncate something when you code your drawing as you do. With sinc or bilinear interpolation you will see non-uniform shades of gray. Bicubic interpolation will be - probably - much better.
But if you want to see your matrix as you want to see it, don't use imshow. Use figimage. plt.figure(figsize=(7.5,7.5)) plt.figimage(x,cmap=plt.cm.gray_r) And, for goodness sake... Don't shoot yourself in the foot by savefig, which stores not the matrix, but the figure, the drawing of it after all the calamities. Use plt.imsave('bug.png',x,cmap=plt.cm.gray_r) Good luck. Jerzy Karczmarczuk ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users