I found the following strange (unstable) behavior of the Python addcopyfighandler package. I use the same code in two computers, #1 and #2
import matplotlib.pyplot as plt
import numpy as np
import addcopyfighandler
t = np.arange(0.0, 2.0, 0.01)
s = 1 + np.sin(2 * np.pi * t)
fig, ax = plt.subplots()
ax.plot(t, s)
ax.set(xlabel='time (s)', ylabel='voltage (mV)',
title='About as simple as it gets, folks')
ax.grid()
fig.savefig("test.png")
plt.show()
In #1 computer, I addcopyfighandler works as expectedly fine, with the use of ctrl+C, I can copy and then paste the plot to the paint program. But in #2 computer, after ctrl+C, the clipboard is empty, so after pasting (ctrl+V), the paint program is empty. Only the one difference I have found visually, in #1 computer the matplotlib-navigationtoolbar of plt figure is in the top, but in #2 the matplotlib-navigationtoolbar of plt is in the bottom, see image. I use Python 3.10 (Win-10). How to overcome this issue and copy the figure by ctrl+C for all cases? I use Python 3.10 (Win-10). Thanks. enter image description here