figure of imshow() is too small

后端 未结 4 471
别跟我提以往
别跟我提以往 2020-11-30 01:15

I\'m trying to visualize a numpy array using imshow() since it\'s similar to imagesc() in Matlab.

imshow(random.rand(8, 90), interpolation=\'nearest\')
         


        
4条回答
  •  旧巷少年郎
    2020-11-30 01:58

    That's strange, it definitely works for me:

    from matplotlib import pyplot as plt
    
    plt.figure(figsize = (20,2))
    plt.imshow(random.rand(8, 90), interpolation='nearest')
    

    I am using the "MacOSX" backend, btw.

提交回复
热议问题