I am trying to achieve a simple goal in matplotlib ... I want to place a small logo or indicator in the lower right corner of the chart without changing the axis or the actual data that is displayed. Here is my code now:
fig = plt.figure()
plt.rcParams.update({'font.size': 15})
img = plt.imread('./path/to/image.png')
ax1 = fig.add_subplot(111)
ax1.yaxis.tick_left()
ax1.tick_params(axis='y', colors='black', labelsize=15)
ax1.tick_params(axis='x', colors='black', labelsize=15)
plt.grid(b=True, which='major', color='#D3D3D3', linestyle='-')
plt.scatter([1,2,3,4,5],[5,4,3,2,1], alpha=1.0)
plt.autoscale(enable=True, axis=u'both')
fig.savefig('figure.png')
My conclusion from this is below.
Now you put the photo along the entire chart - I would like it to scale to 20% of the width and height (if possible) and snap to the lower right. This also destroys my axis, because in this output I should be in the range 0-100 on both x and y. Any ideas to solve this problem, scaling is a big problem.
Edit1: , SO. , extent imshow(), . , , , 0..1000 50..100, , .
Edit2: , fig.get_size_inches() extent. -, matplotlib , .
