1

I am trying to make a subplot from a few png files. However, it appears that the frame sizes of the photos were also included the resulting output. I appreciate if anybody could tell me why and how to resolve the issues?
m

thanks

import matplotlib.image as mpimg
import matplotlib.pyplot as plt
img1 = mpimg.imread('plot/test1.png')
img2 = mpimg.imread('plot/test2.png')



plt.figure(1)
plt.subplot(121)
plt.imshow(img1)

plt.subplot(122)
plt.imshow(img2)

plt.show()
shinachi
  • 33
  • 2
  • It's a bit unclear what you're asking. What exactly is the issue? What do you not understand about the outcome? – ImportanceOfBeingErnest Jun 02 '18 at 15:35
  • I don't want the 0, 200, 400, ... axis appear on the output. The two original photos have no such axis, but after reading those photos and making subplot, some strange axis appear. I guess it is frame size of the original photos. – shinachi Jun 02 '18 at 15:41
  • By default every matplotlib plot has axes. Is the question [how to turn axes off](https://stackoverflow.com/questions/25862026/turn-off-axes-in-subplots)? (A sidenote: this is the [Droste effect](https://en.wikipedia.org/wiki/Droste_effect), and there are some [nice pictures of it around](http://www.google.de/search?q=repeating+droste+effect&tbm=isch).) – ImportanceOfBeingErnest Jun 02 '18 at 15:48
  • Do you mean [hiding axis text in matplotlib plots](https://stackoverflow.com/questions/2176424/hiding-axis-text-in-matplotlib-plots)? If so, `plt.axis('off')` should work. – Bill Jun 02 '18 at 16:01
  • I'm closing not to attract more duplicate answers. – ImportanceOfBeingErnest Jun 02 '18 at 16:10

0 Answers0