figure of imshow() is too small

后端 未结 4 470
别跟我提以往
别跟我提以往 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 02:17

    I'm new to python too. Here is something that looks like will do what you want to

    axes([0.08, 0.08, 0.94-0.08, 0.94-0.08]) #[left, bottom, width, height]
    axis('scaled')`
    

    I believe this decides the size of the canvas.

提交回复
热议问题