我想使用matplotlib在图表的右下角添加徽标。你知道吗
我的商标不合适。你知道吗
我的徽标源=“https://raw.githubusercontent.com/cldougl/plot\u images/add\r\u img/vox.png““
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as image
import matplotlib.pyplot as plt#
from matplotlib.offsetbox import OffsetImage
fig, ax = plt.subplots()
logo=image.imread("https://raw.githubusercontent.com/cldougl/plot_images/add_r_img/vox.png")
# You have to add your own logo, this is in my own folder
addLogo = OffsetImage(logo, zoom=0.4)
#addLogo.set_zorder(100)
addLogo.set_offset((250,-25)) # pass the position in a tuple
ax.add_artist(addLogo)
height = [6, 10, 5, 18, 45]
bars = ('A', 'B', 'C', 'D', 'E')
y = np.arange(len(bars))
plt.bar(y, height, color=(0.2, 0.4, 0.6, 0.6))
目前没有回答
相关问题 更多 >
编程相关推荐