如何使用没有边框的Matplottlib旋转图像?

时间:2016-07-29 16:03:33

标签: python matplotlib

我想要旋转的白色背景图像。但是,旋转会在图像周围创建不需要的边框(不是轴,而是下方铅笔周围的灰色轮廓)。如何删除此边框?

fig,ax = plt.subplots(figsize=(8,6))

pencil = mpimg.imread('Pencil.jpg')
pencil = ndimage.rotate(pencil,105)
ax.imshow(pencil,aspect='equal')

enter image description here

1 个答案:

答案 0 :(得分:3)

相关问题