frameon suppresses the figure frame. What you want to do is show the figure canvas in a frameless window, which cannot be managed from within matplotlib, because the window is an element of the GUI that shows the canvas. Whether it is possible to suppress the frame and how to do that will depend on the operating system and the matplotlib backend in use.
Let's consider the tk backend.
import matplotlib # make sure Tk backend is used matplotlib.use("TkAgg") import matplotlib.pyplot as plt # turn navigation toolbar off plt.rcParams['toolbar'] = 'None' # create a figure and subplot fig, ax = plt.subplots(figsize=(2,2)) #remove margins fig.subplots_adjust(0,0,1,1) # turn axes off ax.axis("off") # show image im = plt.imread("https://upload.wikimedia.org/wikipedia/commons/8/87/QRCode.png") ax.imshow(im) # remove window frame fig.canvas.manager.window.overrideredirect(1) plt.show()
