Skip to content Skip to sidebar Skip to footer

How To Use Matplotlib To Add Image To The Top Level Of Surface Of All The Existing Layers

I am trying to add a logo to the current plot, which already has existing plot elements. I defined a background in the plot_pic() function. Then plot it, and I want to add a logo t

Solution 1:

The problem is that setting the zorder with the keyword arguments sets the zorder of the image inside the OffsetBox, which will have no effect. In order to set the zorder of the box itself, you need to set this externally:

addLogo = OffsetImage(logo, zoom=0.6)
addLogo.set_zorder(10)

Post a Comment for "How To Use Matplotlib To Add Image To The Top Level Of Surface Of All The Existing Layers"