Copying a matplotlib canvas (or a figure, or an axes) is not easy. You
cannot just rebind it. You need to copy all the hierarchy of
underlying artists. Also the attributes of artists need to be adjusted
accordingly.
And best option in my opinion is just to create another canvas using
the code that
Hey folks,
my problem may be obvious, but i can't seem to copy a plot from one canvas
to another.
# I have this object where whichCanvas is an instance of MplWidget (code
shown below)
self.whichCanvas.canvas.ax.plot(xData, yData, 'bo', linewidth=1.5,
linestyle='-')
# I want to cop